Skip to content
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

Lifecycle Method: componentWillUpdate arguments order #4

Open
erickakoyama opened this issue Feb 24, 2019 · 1 comment
Open

Lifecycle Method: componentWillUpdate arguments order #4

erickakoyama opened this issue Feb 24, 2019 · 1 comment

Comments

@erickakoyama
Copy link

After running the codemod, willUpdate(stateChanges, propChanges) converted to UNSAFE_componentWillUpdate(stateChanges, propChanges). From the React docs it looks like propChanges should be the first argument to this method, followed by stateChanges, so it would be expected to look like UNSAFE_componentWillUpdate(propChanges, stateChanges).

@kienD
Copy link

kienD commented Mar 6, 2019

This also applies to the react lifecycle shouldComponentUpdate.

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

No branches or pull requests

2 participants