Repository navigation
feat: added experimental React-style function components - #48
Conversation
|
Hey @theobiabo, first, an apology. You asked to take this issue, I said yes, and then after you'd put in all this work I changed the design under you. That's on me, not you. I should have told you on the issue as soon as I started rethinking hooks. The work itself is really good. The report is unusually honest about where it falls short: the performance gate, the render isolation limits, what wasn't measured. That's exactly what I wanted from #27. What changed: while reviewing the design I realised hooks fight GPUI's model, so #27 now uses signals instead. They're
Your finding that equal props can't skip rendering without If you're still up for it, I'd love for you to keep going on the signals version. If you'd rather not after this, that's completely understandable, and thank you either way. Happy to answer any design questions on the issue. |
|
Sure I'm still up. |
|
hey @theobiabo any updates? |
|
Yooo, @1bye will raise a PR, I migrated the configs to a more better PC, should do that before EOD. |
|
@theobiabo that's cool, ty! |
|
Sure bro. |
|
Yo @1bye, please, you can confirm the PR now; all stated changes have been updated. |
|
@theobiabo awesome! Let CI run and I will review it, and merge |
|
Sure one chief. |
|
@theobiabo I reviewed the implementation against #27 and reran the feature suites: 262 tests passed. The core signals implementation is in place, but a few things need resolving before merging:
The unrelated CI installation issue and unused-parameter failures are being handled separately. |
|
Sure I'm gonna fix that. |
|
@1bye The issue has been fixed. |
|
Hey @1bye Let me know if there are any issues, would be on the standby. |
|
@theobiabo yep, here it is |
|
@theobiabo Before merging, please complete the remaining #27 requirements within Rake, using the existing pinned GPUI unchanged:
We reran the full benchmark suite three times. All correctness and disposal assertions passed, but the measured performance overhead remains above the target. Please profile and optimize the Rake-side implementation, then rerun the benchmark matrix and commit the results. Keep correctness, state identity, borrowed reads, and cleanup guarantees covered. If the performance target proves unreachable under the unchanged-GPUI constraint, bring back measurements explaining the limitation before proposing a scope change. |
|
@theobiabo I have fixed CI problems and tiny other things |
|
Okay, that sounds great, will make this updates. I'm open to picking on other issues too. |
|
@theobiabo any updates? Just want to close this PR and forget about it, xd |
|
Oh, I thought you were fixing some tiny issues. Okay will complete it. |
Resolve reactive markup and rest forwarding. Preserve caching for provably constrained flex roots and reuse render dependency storage. Refs 1bye#27
Keep cache style storage on the mounted GPUI view and attach signal metadata using the shell element type.
TestAppContext already draws when an update flushes. Measure that frame and check every row changed by a bulk update.
|
Hello @1bye, looking into the issues? Or i should take it up too, amazing one buddy. |
Summary
Adds opt-in signal-based function components for #27 behind
experimental-reactive. Components use#[rake::component]and compose with the existingview!syntax. A component that takes&mut Setupruns setup once per mount and retains its state by stable ID. The final expression renders with current props.Signal<T>andMemo<T>handles, dependency tracking, effects, cleanup, and component-owned tasks.Verification
The Rake and Function components workflows passed on
572772ec. The macOS and Linux component jobs covered runtime behavior and consumer builds. Rake CI · Function components CIExperimental performance acceptance
The maintainer accepts the measured overhead for this opt-in merge. The approximately 10% target in #27 remains open.
cached = falsehelps components whose rows change together, while caching helps isolated updates.Both sets of measurements used the existing gpui-pre 0.3.11 pin. Benchmark report