Skip to content

Conversation

sebmarkbage
Copy link
Collaborator

Follow up to #27513. There's two issues here.

First, we didn't restore the ReplaySet when calling renderNode() so it was not safe to invoke since future siblings might observe the mutated replay. This could skip replays which covered up errors.

Second, this was covering up that we weren't properly cleaning up the replay nodes when we were able to render through one node and then mutated the .node on the task but then suspended deeper.

I don't love the solution from #27513 in general because it feels hacky to compare the mutated node. It should probably be structured different. There's also another case that's basically the same case which has neither of these fixes in it. It's probably a bug too but haven't been able to repro yet:

// Suspend
throw x;

@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Jun 20, 2025
@sebmarkbage sebmarkbage changed the title [Fizz] Clean up the tasks [Fizz] Clean up the replay nodes if we're already rendered past an element Jun 20, 2025
@react-sizebot
Copy link

Comparing: a947eba...917c674

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 530.57 kB 530.57 kB = 93.67 kB 93.67 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 651.66 kB 651.66 kB = 114.78 kB 114.78 kB
facebook-www/ReactDOM-prod.classic.js = 674.81 kB 674.81 kB = 118.78 kB 118.78 kB
facebook-www/ReactDOM-prod.modern.js = 665.30 kB 665.30 kB = 117.19 kB 117.19 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 917c674

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants