mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Remove irrelevant suggestion of a legacy method from a warning (#13169)
* Edit warn message what use deprecated lifecycle method * delete setState warn message about prescriptive and deprecated life cycle * fix lint * Prettier * Formatting
This commit is contained in:
1 parent
fddb23601f
commit
6db080154b
2 files changed
+2
-6
No files matched your search
@@ -466,9 +466,7 @@ describe('ReactCompositeComponent', () => {
|
||||
instance = ReactDOM.render(<Component />, container);
|
||||
}).toWarnDev(
|
||||
'Cannot update during an existing state transition (such as within ' +
|
||||
"`render` or another component's constructor). Render methods should " +
|
||||
'be a pure function of props and state; constructor side-effects are ' +
|
||||
'an anti-pattern, but can be moved to `componentWillMount`.',
|
||||
'`render`). Render methods should be a pure function of props and state.',
|
||||
{withoutStack: true},
|
||||
);
|
||||
|
||||
|
||||
+1
-3
@@ -210,9 +210,7 @@ if (__DEV__) {
|
||||
warningWithoutStack(
|
||||
false,
|
||||
'Cannot update during an existing state transition (such as within ' +
|
||||
"`render` or another component's constructor). Render methods should " +
|
||||
'be a pure function of props and state; constructor side-effects are ' +
|
||||
'an anti-pattern, but can be moved to `componentWillMount`.',
|
||||
'`render`). Render methods should be a pure function of props and state.',
|
||||
);
|
||||
didWarnAboutStateTransition = true;
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user