Bug: missing interactions in profiler
See original GitHub issueReact version: 16.13.1
Steps To Reproduce
There’s a few things involved here, so it’s hard to describe the exact steps, but here’s a reduced test case:
- Code https://stackblitz.com/edit/react-profiler-missing-interactions?file=index.tsx
- Run the code https://react-profiler-missing-interactions.stackblitz.io/
The test case has a parent and child component, both of which are dispatching an action to Redux and subscribing to Redux state. Each action dispatch is wrapped in unstable_trace
.
Note I did try to reduce the test case further to see if I could reproduce without Redux and React Redux, but to no avail. However, due to the fact that the state updates occur—we’re just missing the interactions—I believe this problem is not due to either of those libraries.
The current behavior
Both state updates apply (parent and child), but the profiler only seems to capture the interactions for the child, not the parent. The parent interaction is missing.
The test case is logging interactions to the console so you can verify there.
Here’s a screenshot to show what I mean. I took this screenshot after using the profiler’s “reload and start profiling” feature:
The expected behavior
No missing interactions
Potentially related: https://github.com/facebook/react/issues/15566
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
No worries. Good luck~
This is still affecting me.