fw-05 step 02 — Join reactivity to rendering
Goal
The join that changes the cost curve: wrap each component's render in a fw-03 effect.
Tasks
- Components with lifecycle.
- Wrap each component's render in an effect, so reactive reads subscribe that component's render.
- Demonstrate: change a value read by a deep child; confirm the parent does not re-render.
Compare with
fw-02, where a state change re-renders the subtree. - Scheduler: deduplicate and flush component updates on a microtask. Reproduce the un-scheduled case where one component renders three times in a tick.
- Event handler identity: measure naive remove-and-re-add versus a stable indirection.
- Handle a component whose dependencies change between renders (a conditional read) — confirm
fw-03's cleanup handles it.
Done when
-
Parent-does-not-re-render demonstrated and measured against
fw-02 - Scheduler dedupes; the un-scheduled case reproduced first
- You can state where React's and Vue's defaults each place the burden