React 16: componentDidUpdate Warning: Cascaded update scheduled

I have profiled the performance of my application using the redux reaction, following in this article by Ben Schwartz .

In the user time section, I get these warnings (without an entry sign):

enter image description here

There are two posts:

  • (Committing Changes) Warning: Lifecycle hook scheduled a cascading update
  • Connect(MyComponent).componentDidUpdate Warning: Scheduled a cascading update

I did a few searches, but found nothing special. This seems to be related to the componentDidUpdate function of the HOC of the reaction-reduct.

What do these messages mean?

+5
source share
1 answer

Messages mean that the DidUpdate component receives the changed details or sets the state, and therefore the update will be cascaded (it will happen immediately after the last update), because this is the last lifecycle method that is called during the update. Basically, React determined that another update should happen, and it has not yet completed with its current update. I'm not sure if this is a problem with response-redux or your application.

+3
source

Source: https://habr.com/ru/post/1273802/


All Articles