Skip to content

Enhance get derived state from props state warning - #12670 #13317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style fix
  • Loading branch information
Felix Wu committed Aug 3, 2018
commit ec8474cf9253b3640c20d3c0e19ec5092f67cf94
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,12 @@ describe('create-react-class-integration', () => {
});
expect(() =>
ReactDOM.render(<Component />, document.createElement('div')),
).toWarnDev('Component state must be properly initialized when using getDerivedStateFromProps.', {
withoutStack: true,
});
).toWarnDev(
'Component state must be properly initialized when using getDerivedStateFromProps.',
{
withoutStack: true,
},
);
});

it('should not invoke deprecated lifecycles (cWM/cWRP/cWU) if new static gDSFP is present', () => {
Expand Down