Skip to content

Conversation

@gaearon
Copy link
Collaborator

@gaearon gaearon commented Dec 2, 2021

No intentional functional changes (but bugs are possible).

We're going to need to track whether an event is currently being replayed in #22680 without relying on the flags (because from React's perspective it would be a regular browser event). In #22680, we solve this by keeping a Set of currently replaying events. However, we've also added an invariant to forbid reentrancy. I think this means the Set is unnecessary. If we're confident React dispatching isn't reentrant, let's just keep the "current" event, similar to how we track other "current" things in the reconciler.

@facebook-github-bot facebook-github-bot added the React Core Team Opened by a member of the React Core Team label Dec 2, 2021
@sizebot
Copy link

sizebot commented Dec 2, 2021

Comparing: ca106a0...7a61e9c

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.min.js +0.16% 130.01 kB 130.22 kB +0.16% 41.57 kB 41.64 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js +0.15% 134.77 kB 134.97 kB +0.12% 42.96 kB 43.02 kB
facebook-www/ReactDOM-prod.classic.js +0.68% 424.63 kB 427.52 kB +0.30% 78.24 kB 78.48 kB
facebook-www/ReactDOM-prod.modern.js +0.70% 413.19 kB 416.08 kB +0.40% 76.51 kB 76.82 kB
facebook-www/ReactDOMForked-prod.classic.js +0.68% 424.63 kB 427.52 kB +0.30% 78.25 kB 78.48 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
facebook-www/ReactDOM-prod.modern.js +0.70% 413.19 kB 416.08 kB +0.40% 76.51 kB 76.82 kB
facebook-www/ReactDOMForked-prod.modern.js +0.70% 413.19 kB 416.08 kB +0.40% 76.51 kB 76.82 kB
facebook-www/ReactDOM-prod.classic.js +0.68% 424.63 kB 427.52 kB +0.30% 78.24 kB 78.48 kB
facebook-www/ReactDOMForked-prod.classic.js +0.68% 424.63 kB 427.52 kB +0.30% 78.25 kB 78.48 kB
facebook-www/ReactDOM-profiling.modern.js +0.65% 445.02 kB 447.91 kB +0.38% 81.92 kB 82.24 kB
facebook-www/ReactDOMForked-profiling.modern.js +0.65% 445.02 kB 447.91 kB +0.38% 81.93 kB 82.24 kB
facebook-www/ReactDOM-profiling.classic.js +0.63% 456.51 kB 459.40 kB +0.29% 83.69 kB 83.94 kB
facebook-www/ReactDOMForked-profiling.classic.js +0.63% 456.51 kB 459.40 kB +0.29% 83.70 kB 83.94 kB
facebook-www/ReactDOMForked-dev.modern.js +0.35% 1,095.97 kB 1,099.79 kB +0.12% 243.19 kB 243.49 kB
facebook-www/ReactDOM-dev.modern.js +0.35% 1,095.97 kB 1,099.79 kB +0.12% 243.20 kB 243.50 kB
facebook-www/ReactDOMForked-dev.classic.js +0.34% 1,120.10 kB 1,123.92 kB +0.05% 248.16 kB 248.28 kB
facebook-www/ReactDOM-dev.classic.js +0.34% 1,120.10 kB 1,123.92 kB +0.05% 248.16 kB 248.28 kB
facebook-www/ReactDOMTesting-prod.classic.js +0.27% 420.24 kB 421.39 kB +0.11% 78.92 kB 79.00 kB
facebook-www/ReactDOMTesting-prod.modern.js +0.27% 406.93 kB 408.02 kB +0.18% 76.75 kB 76.89 kB

Generated by 🚫 dangerJS against 7a61e9c

Co-authored-by: Dan Abramov <dan.abramov@me.com>
@gaearon gaearon merged commit 44f99d7 into facebook:main Dec 2, 2021
zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Apr 15, 2022
* Track currently replaying event

Co-authored-by: Dan Abramov <dan.abramov@me.com>

* Add warnings

Co-authored-by: Marco Salazar <salazarm@fb.com>
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