Remove interim `Tag` in Component render pipeline
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, python, react
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 29k
- Fork
- 1.8k
- Merge trung bình
- 2 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 143
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của reflex-dev/reflex
-
Operations on a list[T] | None var throw when the value is NoneCó thể đã có người làm @masenf đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
reflex-dev/reflex#7826 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
reflex-dev/reflex#7825 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
PropsBase nested serialization applies parent include/exclude filters to child fieldsCó thể đã có người làm @harsh21234i đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
reflex-dev/reflex#7787 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
OTel: add trace_flags to JSON log records so unsampled trace ids are recognizableCó thể đã có người làm @ShaanGS đã nhận 7 ngày trước. Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
reflex-dev/reflex#7729 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
0.9.12 changelog follow-ups: the #7132 "_get_was_touched" entry describes unreachable behaviour, #7115's hasattr/getattr change is undocumented, #7131's wordingCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
reflex-dev/reflex#7260 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của reflex-dev/reflex
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
UKGovernmentBEIS/inspect_ai#6512 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/c++ area/core kind/bug-report
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
tensorflow/quantum#1140 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
Kav-K/GPTDiscord#501 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
UKGovernmentBEIS/inspect_evals#2863 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày