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

fixing issue with announcer and hot module reloading #1585

Merged
merged 5 commits into from
Nov 8, 2019
Merged

Conversation

alexreardon
Copy link
Collaborator

Closes #1584

const toBeRemoved: ?HTMLElement = ref.current;
invariant(toBeRemoved, 'Cannot unmount announcement node');

// Remove from body
getBodyElement().removeChild(toBeRemoved);
ref.current = null;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is the fix here. Clearing the ref before the timeout

@@ -30,6 +30,7 @@ This page contains a list of articles, blogs and newsletters that `react-beautif

## Newsletters

- Tiny letter [November 04, 2019](https://tinyletter.com/cassidoo/letters/the-world-is-changed-by-your-example-not-by-your-opinion-paulo-coelho)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

unrelated :D

@alexreardon alexreardon merged commit 1b751f8 into master Nov 8, 2019
@alexreardon alexreardon deleted the fixing-hmr branch November 8, 2019 05:16
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.

Invariant failed: Announcement node already mounted
1 participant