bryceosterhaus / metal-to-react

Codemods for migrating metal-jsx to react
13 stars 2 forks source link

Lifecycle Method: componentWillUpdate arguments order #4

Open erickakoyama opened 5 years ago

erickakoyama commented 5 years ago

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 commented 5 years ago

This also applies to the react lifecycle shouldComponentUpdate.