()
| 26779 | } |
| 26780 | |
| 26781 | function checkForNestedUpdates() { |
| 26782 | if (nestedUpdateCount > NESTED_UPDATE_LIMIT) { |
| 26783 | nestedUpdateCount = 0; |
| 26784 | rootWithNestedUpdates = null; |
| 26785 | |
| 26786 | { |
| 26787 | { |
| 26788 | throw Error( "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops." ); |
| 26789 | } |
| 26790 | } |
| 26791 | } |
| 26792 | |
| 26793 | { |
| 26794 | if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) { |
| 26795 | nestedPassiveUpdateCount = 0; |
| 26796 | |
| 26797 | error('Maximum update depth exceeded. This can happen when a component ' + "calls setState inside useEffect, but useEffect either doesn't " + 'have a dependency array, or one of the dependencies changes on ' + 'every render.'); |
| 26798 | } |
| 26799 | } |
| 26800 | } |
| 26801 | |
| 26802 | function flushRenderPhaseStrictModeWarningsInDEV() { |
| 26803 | { |
no test coverage detected