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 this.unmounted being true when re-mounted by React 18 #480

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

Conversation

dralletje
Copy link
Contributor

I understand that you are spending your time now on React Router v6, but it would be very nice to have this in still.
This one line change made my app go from "Reach Router not doing anything at all" to working perfectly on React 18.

React 18 can render componentWillUnmount and then componentDidMount the same instance that was just "willUnmount"-ed.
This makes sure we reset this.unmounted = false when re-didMount-ing.

React 18 can render componentWillUnmount and then componentDidMount the same instance that was just "willUnmount"-ed.
This makes sure we reset `this.unmounted = false` when re-didMount-ing.
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.

1 participant