I've recently upgraded to fiber. In 15, when a component updates, the update stack trace looks like this
component1Update
...react framework stuff
component2Update
...react framework stuff
component3Update
setState
onClick() <-- Aha!
How do you find the origin of update in Fiber (React 16)?
I would recommend looking up the node that is being constantly updated in react-profiler, and then decorate that component with https://github.com/welldone-software/why-did-you-render this should tell you why did it update.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With