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

Remove deprecated isMounted() #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nowreenc
Copy link

React has deprecated isMounted() and recommends migrating this way:
An easy migration strategy for anyone upgrading their code to avoid isMounted() is to track the mounted status yourself. Just set a _isMounted property to true in componentDidMount and set it to false in componentWillUnmount, and use this variable to check your component’s status.
https://reactjs.org/blog/2015/12/16/ismounted-antipattern.html
This also fixes the console warning thrown by React about the deprecated isMounted()

@dhritzkiv
Copy link
Member

Duplicate of #14.

Despite this being a relatively straightforward change, I am unwilling to merge this as I'm not familiar with react and ampersand together, nor are there any tests to check breakages or side effects.

Thank you for the PR, nonetheless

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