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

Fix componentWillMount deprecation #6

Merged
merged 1 commit into from
May 30, 2018

Conversation

jeremykay
Copy link
Contributor

componentWillMount is deprecated and should not be used. Instead use componentDidMount.

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

facebook/react#7671

Because this HOC adds an event listener, this can cause memory leaks when the component is rendered on the server, because it never unmounts.

@pgilad
Copy link
Owner

pgilad commented May 30, 2018

Awesome!

@pgilad pgilad merged commit 687d7e3 into pgilad:master May 30, 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.

2 participants