Skip to content

fix(state): don't drop effects under render-phase convergence (v3.5.4)#51

Merged
monstercameron merged 1 commit into
masterfrom
react-parity/fix-render-phase-effects
Jun 25, 2026
Merged

fix(state): don't drop effects under render-phase convergence (v3.5.4)#51
monstercameron merged 1 commit into
masterfrom
react-parity/fix-render-phase-effects

Conversation

@monstercameron

Copy link
Copy Markdown
Owner

Regression fix for v3.5.3: render-phase convergence dropped a stable-deps effect (cleared per-iteration, never re-registered). Now effects accumulate and dedup by cleanup-index to the final render's effect, running once with the converged state. Full suite + native/wasm pass. Ships as v3.5.4.

🤖 Generated with Claude Code

Regression in v3.5.3: the render-phase convergence loop cleared the fiber's
effect list before each re-run. Combined with the deps-equality check (a
stable-deps effect does not re-register when deps are unchanged), the effect ended
up registered in no iteration and never ran.

The loop no longer clears parseFiber.effects. Effects accumulate across
convergence iterations (a stable effect appears once; a deps-changing effect once
per iteration) and are de-duplicated afterwards by cleanup-index via
dedupRenderPhaseEffects, keeping the last (final render's) effect per slot in
declaration order. Each effect now runs exactly once with the converged state for
both stable and changing deps; multiple effects run once each in order.

Covered by TestRenderPhaseEffectRunsOnceStableDeps / ...ChangingDeps /
TestRenderPhaseMultipleEffectsEachOnce. Full suite + native/wasm pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@monstercameron monstercameron merged commit cab0d20 into master Jun 25, 2026
3 checks passed
@monstercameron monstercameron deleted the react-parity/fix-render-phase-effects branch June 25, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants