Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

CHEATSHEET.md and RFC 02 still recommend module-scope state for app-wide state (follow-up to #3390)

オープン 初心者向け
#4,141 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
86/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, typescript
領域
documentation

調査の方向性

packages/solid/CHEATSHEET.mdの353行目付近とdocumentation/solid-2.0/02-signals-derived-ownership.mdの93行目付近を読み、createContextのJSDocおよび2.0の状態管理ガイドの記述と照らし合わせてください。古くなった2つの文を更新し、特にSSRではProviderがサブツリーおよびアプリ全体の状態を管理し、モジュールスコープは定数用に限定することを説明してください。両方のドキュメントで一貫した説明になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Follow-up to #3390 / #3395, which fixed the createContext JSDoc. Two other copies of the same guidance were not updated and still say the opposite of the 2.0 docs (checked on next at d2ad8b28):

  • packages/solid/CHEATSHEET.md, line 353 ("Context, components, lazy"): "If you want truly app-wide state, don't use Context — a module-scope signal/store is a global."
  • documentation/solid-2.0/02-signals-derived-ownership.md, line 93: the same sentence.

The cheatsheet copy matters most, because it is the one written for AI tools:

  • It ships in the package (node_modules/solid-js/CHEATSHEET.md, 2.0.0-rc.15 included).
  • The README's "For LLMs / AI assistants" section and the new solid-2.0 primer skill both point agents to it.
  • scripts/build-cheatsheet-skill.mjs publishes it as the solid-2.0-cheatsheet skill.

So agents that follow Solid's own guidance learn the rule the docs reversed on 2026-09-07 (solid-docs 413890c, "recommend context over module state"). Concepts → Reactivity, Components and JSX → Context, and the State management guide all say to prefer a provider, and to use module scope only for constants and the createContext call.

Suggested fix: replace both sentences with the wording #3395 put in the JSDoc:

Context is for state that belongs to a subtree, which includes app-wide state in an app that renders on the server: a value created inside a component is created once per request, and the Provider owns and disposes it. Module scope is shared by every request in the same process, so reserve it for constants.

Optionally, add the client-only nuance from the State management guide: without ssr: true, a module-scope store is one store per tab, but it becomes shared server state the day SSR is turned on, so creating it in a provider from the start is the portable choice.

主要言語
TypeScript
スター
36.1k
フォーク
1.1k
平均マージ
11時間 45分
マージ済み PR(30日)
329

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

solidjs/solid のほかの issue

solidjs/solid の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。