Remove interim `Tag` in Component render pipeline
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, python, react
Direzione di ricerca
Start with packages/reflex-base/src/reflex_base/components/component.py and trace how compiler templates consume the render dict. The issue also names packages/reflex-base/src/reflex_base/components/tags/ and related work #6235 and #6214 as context. Done means rendering produces a Var for the jsx(...) call, compiler templates consume it, and the deprecation path for _render() overrides is addressed.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Component._render() returns a Tag, and Component.render() turns it into a render dict that the compiler templates serialize into JSX. Replace that interim stage: Component.render() returns a Var representing the jsx(...) function call, and the Var carries the hooks, imports and app wraps the component requires through its VarData. This is a breaking change for code that subclasses the render path.
Why
- A rendered component becomes an ordinary value in the Var system, so a component can appear wherever a
Varis accepted (props,cond/match/foreachbranches, memo returns) without the special-cased Component-to-Var conversion, which today drops part of theVarData(Linear ENG-9593). - The
Tag/render-dict stage is an untyped dict between Python objects and emitted JS. Collapsing it removes a layer the single-pass compiler (#6235) has to walk and lets a_get_var_data()-style collection replace the separate hooks, app wraps, imports and custom-code paths onComponent. - Immutable components (#6214) already treat a component as a value; rendering to a
Varis the matching output side.
Scope
Component._render()/Component.render()produce aVarfor thejsxcall instead of aCommonTag/ render dict (packages/reflex-base/src/reflex_base/components/component.py).packages/reflex-base/src/reflex_base/components/tags/is removed, or kept as an internal helper for the deprecation window only.- Compiler templates consume the rendered
Varinstead of the render dict. - Deprecation path for components that override
_render()to return aTag.
Related
- #6235 Single Pass Compiler: Tracking Issue
- #6214 Single-pass compiler: Make Component effectively immutable
- Lingua principale
- Python
- Stelle
- 29k
- Fork
- 1.8k
- Merge medio
- 2g 22h
- PR unite (30g)
- 143
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- 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 reflex-dev/reflex
-
Operations on a list[T] | None var throw when the value is NoneForse già presa @masenf l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
reflex-dev/reflex#7826 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
reflex-dev/reflex#7825 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
PropsBase nested serialization applies parent include/exclude filters to child fieldsForse già presa @harsh21234i l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
reflex-dev/reflex#7787 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
OTel: add trace_flags to JSON log records so unsampled trace ids are recognizableForse già presa @ShaanGS l’ha presa 7 giorni fa. Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
reflex-dev/reflex#7729 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
0.9.12 changelog follow-ups: the #7132 "_get_was_touched" entry describes unreachable behaviour, #7115's hasattr/getattr change is undocumented, #7131's wordingForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
reflex-dev/reflex#7260 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di reflex-dev/reflex
Issue simili
-
[Bug]: graphify query loads every language extractor just for _file_stem (about 34 ms per call)Forse già presa @rohit-jsfreaky l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Graphify-Labs/graphify#5160 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Variable declared without a value suppresses ${VAR:-default} expansionForse già presa @Omarinho12345 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
theskumar/python-dotenv#750 ·
I maintainer di solito rispondono entro 12 giorni
-
Minor bug: Main page buttonApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
UKGovernmentBEIS/control-arena#947 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
jasonacox/Powerwall-Dashboard#897 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno