Remove interim `Tag` in Component render pipeline
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, python, react
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 29k
- Forks
- 1.8k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 143
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from reflex-dev/reflex
-
Operations on a list[T] | None var throw when the value is NonePossibly taken @masenf claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
reflex-dev/reflex#7826 · 1 comment ·
Maintainers usually reply within 1 day
-
A dev run stopped before its backend loads leaves .web/nocompile, so the next run or export skips the compilePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
reflex-dev/reflex#7825 · 1 comment ·
Maintainers usually reply within 1 day
-
PropsBase nested serialization applies parent include/exclude filters to child fieldsPossibly taken @harsh21234i claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
reflex-dev/reflex#7787 · 1 comment ·
Maintainers usually reply within 1 day
-
OTel: add trace_flags to JSON log records so unsampled trace ids are recognizablePossibly taken @ShaanGS claimed this 7 days ago. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
reflex-dev/reflex#7729 · 1 comment ·
Maintainers usually reply within 1 day
-
0.9.12 changelog follow-ups: the #7132 "_get_was_touched" entry describes unreachable behaviour, #7115's hasattr/getattr change is undocumented, #7131's wordingMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
reflex-dev/reflex#7260 · 2 comments ·
Maintainers usually reply within 1 day
All issues in reflex-dev/reflex
Similar issues
-
release
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
MichaelYcJo/SpecSeal#1535 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
valentinfrlch/ha-llmvision#769 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 75/100
daniel-ospina/tortoise#11937 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue help wanted python up-for-grabs
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
andrewsiah/agentswarm-data-tasks#238 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
cadence-workflow/cadence-ai-samples#175 ·
Maintainers usually reply within 1 day