Skip to content

Change getDerivedStateFromProps description and parameter names #51

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
merged 1 commit into from
Jan 7, 2019

Conversation

MartinCerny-awin
Copy link
Contributor

Description: This lifecycle method is called on every update (including setState), not only when it receives new props.

Body: There is no access to old props and the contract in official React documentation specifies static getDerivedStateFromProps(props, state) we should stick to the same naming convention https://reactjs.org/docs/react-component.html#static-getderivedstatefromprops

Closes #49

@ice-chillios ice-chillios merged commit 0cdd804 into r5n-labs:master Jan 7, 2019
@ice-chillios
Copy link

@MartinCerny-awin Thanks for the contribution! I will release update today lately :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants