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:
Ideveloper authored and Dan Abramov committed 2018-08-02 02:11:17 +01:00
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
View File
@@ -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;