@samitouri / QOS-React / commits / 6db080154b

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

Ideveloper committed Aug 2, 2018 at 10:11 UTC 6db080154b8a24a1af5385630e41dc814ede037b
2 files changed +2 -6
packages/react-dom/src/__tests__/ReactCompositeComponent-test.js
+1 -3
@@ -466,9 +466,7 @@ describe('ReactCompositeComponent', () => {
466 instance = ReactDOM.render(<Component />, container);
467 }).toWarnDev(
468 'Cannot update during an existing state transition (such as within ' +
469 - "`render` or another component's constructor). Render methods should " +
470 - 'be a pure function of props and state; constructor side-effects are ' +
471 - 'an anti-pattern, but can be moved to `componentWillMount`.',
469 + '`render`). Render methods should be a pure function of props and state.',
470 {withoutStack: true},
471 );
472
packages/react-reconciler/src/ReactFiberScheduler.js
+1 -3
@@ -210,9 +210,7 @@ if (__DEV__) {
210 warningWithoutStack(
211 false,
212 'Cannot update during an existing state transition (such as within ' +
213 - "`render` or another component's constructor). Render methods should " +
214 - 'be a pure function of props and state; constructor side-effects are ' +
215 - 'an anti-pattern, but can be moved to `componentWillMount`.',
213 + '`render`). Render methods should be a pure function of props and state.',
214 );
215 didWarnAboutStateTransition = true;
216 break;