Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Cerrado Apto para principiantes
#4,141 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
86/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript, typescript

Línea de trabajo

Lee packages/solid/CHEATSHEET.md alrededor de la línea 353 y documentation/solid-2.0/02-signals-derived-ownership.md alrededor de la línea 93. Después, compara sus indicaciones con la redacción del JSDoc de createContext y de la guía de gestión del estado de la versión 2.0. Actualiza las dos frases desactualizadas para explicar que los proveedores gestionan el estado de los subárboles y de toda la aplicación, especialmente con SSR, y que el ámbito del módulo debe reservarse para constantes. La tarea estará completa cuando ambos documentos den indicaciones coherentes.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
36.1k
Forks
1.1k
Merge medio
11 h 37 min
PR fusionados (30 d)
344

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de solidjs/solid

Todos los issues de solidjs/solid

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.