dillon1000/react
Commit
Browse files Add component name to StrictMode error message (#25718)
The error message to warn user about state update coming from inside an update function does not contain name of the offending component. Other warnings StrictMode has, always have offending component mentioned in top level error message. Previous error message: ``` An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure with zero side-effects. Consider using componentDidUpdate or a callback. ``` New error message: ``` An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure with zero side-effects. Consider using componentDidUpdate or a callback. Please update the following component: Foo ```
Changed paths2 files
First-parent comparisonpackages/react-reconciler/src/ReactFiberClassUpdateQueue.js ModifiedM packages/react-reconciler/src/__tests__/ReactIncrementalUpdates-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…