CHEATSHEET.md and RFC 02 still recommend module-scope state for app-wide state (follow-up to #3390)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 86/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, typescript
- Ambito
- documentation
Direzione di ricerca
Leggi packages/solid/CHEATSHEET.md intorno alla riga 353 e documentation/solid-2.0/02-signals-derived-ownership.md intorno alla riga 93, poi confronta le indicazioni con la formulazione nel JSDoc di createContext e nella guida alla gestione dello stato della versione 2.0. Aggiorna entrambe le frasi obsolete per spiegare che i provider gestiscono lo stato dei sottoalberi e dell’intera app, specialmente con SSR, e che l’ambito del modulo va riservato alle costanti. Il lavoro è completato quando entrambi i documenti forniscono indicazioni coerenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.0primer skill both point agents to it. scripts/build-cheatsheet-skill.mjspublishes it as thesolid-2.0-cheatsheetskill.
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.
- Lingua principale
- TypeScript
- Stelle
- 36.1k
- Fork
- 1.1k
- Merge medio
- 11h 37m
- PR unite (30g)
- 344
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di solidjs/solid
-
`lazy()`: remounting an already-loaded component renders empty (or the Suspense fallback) since 1.9.14Forse già presa @itisrmk l’ha presa 2 giorni fa. Aperta1.x
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
[2.0 rc.15 + next] For row lifecycle cleanup inherits the list computation and halts on a shared-state writeForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 51/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
`createRoot`'s dispose function keeps `fn` alive, so `<For>`/`<Index>` rows retain removed list itemsForse già presa @boombang l’ha presa 5 giorni fa. Aperta1.x
Difficoltà 4/5 1-2 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di solidjs/solid
Issue simili
-
DQ assisgnment closing at CRApertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
equinor/prisma-decision-web#919 ·
I maintainer di solito rispondono entro 1 giorno
-
[DC] OneLogin sync imports a partial user list when an API request failsForse già presa @RaphaelFakhri l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
bitwarden/directory-connector#1276 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
home-assistant/installer#324 ·
I maintainer di solito rispondono entro 1 giorno
-
Mondriaan
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
knaw-huc/textannoviz#733 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno