react
react copied to clipboard
Stop using Scheduler.log to test double invocations
Stack:
- https://github.com/facebook/react/pull/29006
- https://github.com/facebook/react/pull/29008 <-- You're here
- https://github.com/facebook/react/pull/29007
Summary
In a follow-up, I want to dim console calls for effect invocations due to StrictMode
just like we do for render-time invocations due to StrictMode
. This will automatically ignore Scheduler.log
calls during effect invocations caused by StrictMode
(just like it does for render-time invocations due to StrictMode
).
That means we have to use other means of testing double invocations during StrictMode
. I used the same pattern we used for render-time double invocations: pushing to a log.
Also used the opportunity to reduce the size of some log assertions to make future diffs readable. Git will not be able to correctly identify where a new log lines where added and think they got moved instead.
How did you test this change?
- [x] Assertions on
log
are still the same in https://github.com/facebook/react/pull/29007