Do you want to request a feature or report a bug?
bug
What is the current behavior?
React 16 : componentDidUpdate Warning: Scheduled a cascading update
same question
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
What is the expected behavior?
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React 16
It's not a bug, it's a warning telling you that you scheduled an extra update in componentDidMount
or componentDidUpdate
. Sometimes this is unavoidable (e.g. for layout measurement) but in many cases it is completely avoidable and causes performance issues.
Unfortunately React Redux is currently written in a way that triggers this warning. There's nothing we can do on our side. The plan is to update React Redux to not have to do this in future versions.
@gaearon just wondering, would it be worth me opening a new issue requesting for some documentation on how to debug this warning? Would be helpful to have some docs perhaps on where we can set a debugger to find which component triggers this update. In my case it isn't redux, but my own, so would be helpful to know how to fix.
Most helpful comment
@gaearon just wondering, would it be worth me opening a new issue requesting for some documentation on how to debug this warning? Would be helpful to have some docs perhaps on where we can set a debugger to find which component triggers this update. In my case it isn't redux, but my own, so would be helpful to know how to fix.