Remove getRefValue and getRefValues from state.js before 1.0

Abierto
#7,391 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@harsh21234i ya está trabajando en esto.

Desde el 2/10/2026.

  • #7399 de @harsh21234i — cerrado sin fusionar

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
68/100
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript, python

Línea de trabajo

Start with the root pyproject.toml and package metadata under packages/ to trace every reflex-components-core floor, then inspect packages/reflex-base/src/reflex_base/.templates/web/utils/state.js and tests/units/compiler/test_state_js_template.py. Check the existing news fragments and AppHarnessProd usage before making changes. Done means stale exports and their test are removed, dependency floors and a breaking fragment are updated, and the oldest allowed core combination builds a minimal form in production mode.

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

Descripción

Background

reflex-dev/reflex#7386 changed form submission to read field values only from FormData, by name, through the new getFormData helper. Forms no longer read values through id refs, so nothing in the current framework calls getRefValue or getRefValues in $/utils/state (packages/reflex-base/src/reflex_base/.templates/web/utils/state.js).

They were kept anyway. Published reflex-components-core releases up to 0.9.10.post1 compile every form's submit handler with imports of both helpers. A new reflex-base paired with one of those releases fails the production build:

[MISSING_EXPORT] "getRefValue" is not exported by "utils/state.js".
[MISSING_EXPORT] "getRefValues" is not exported by "utils/state.js".

That pairing is still allowed. #7386 floors reflex-components-radix on reflex-components-core >= 0.9.10.post2.dev0, which covers installs through reflex. But other dependents still admit older core releases:

  • reflex itself declares reflex-components-core >= 0.9.6.
  • Several component packages declare >= 0.9.0.

Upgrading only reflex-base next to an older reflex can also reach the old core.

Task

Before 1.0:

  1. Raise every declared reflex-components-core floor so that no allowed release predates the getFormData submit hook. That means the first core release containing #7386, in the root pyproject.toml and the other packages under packages/.
  2. Remove getRefValue and getRefValues from state.js. They're marked "Kept for forms compiled by reflex-components-core releases that read field values from refs".
  3. Remove test_state_js_keeps_ref_value_exports_for_older_form_components from tests/units/compiler/test_state_js_template.py. Point the slice end in test_merge_slot_props_handles_conditional_event_handlers (currently export const getRefValue =) at the next export.
  4. Add a breaking news fragment in packages/reflex-base/news/ for anyone importing the helpers in custom JS.
  5. Verify the oldest allowed combination still builds a form in production mode. For example: install the oldest allowed published reflex-components-core into a separate target dir, put it first on PYTHONPATH, and build a minimal rx.form app with reflex.testing.AppHarnessProd.
Lenguaje dominante
Python
Estrellas
29k
Forks
1.8k
Merge medio
3 d 5 h
PR fusionados (30 d)
182

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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 reflex-dev/reflex

Todos los issues de reflex-dev/reflex

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.