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

Update lifecycle hooks snippets #44

Merged
merged 5 commits into from
Apr 17, 2018

Conversation

RusinovAnton
Copy link
Contributor

2 new lifecycle hooks were added, componentWill- hooks been deprecated
in React 16.3

refs: https://github.com/facebook/react/releases/tag/v16.3.0

closes #40

2 new lifecycle hooks were added, componentWill- hooks been deprecated
in React 16.3

refs: https://github.com/facebook/react/releases/tag/v16.3.0
@RusinovAnton
Copy link
Contributor Author

@xabikos

Also we might want to add part with condition for getSnapshotBeforeUpdate() from example from react docs:

if (${1:condition}) {
  return ${2:snapshot};
}

return null;

refs: https://reactjs.org/docs/react-component.html#getsnapshotbeforeupdate

@RusinovAnton
Copy link
Contributor Author

RusinovAnton commented Apr 11, 2018

Deprecation note could definitely use some critique.

Copy link
Owner

@xabikos xabikos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RusinovAnton thank you very much for the PR. I would happily merge it. But could you push another commit that removes the not needed white space? I would prefer to only see additions on this PR.

@xabikos xabikos mentioned this pull request Apr 16, 2018
@RusinovAnton
Copy link
Contributor Author

@xabikos done along with some fixes and additions

@xabikos xabikos merged commit 21504b9 into xabikos:master Apr 17, 2018
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

Successfully merging this pull request may close these issues.

Add static getDerivedStateFromProps(){}
2 participants