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(gatsby-cli): Clean up on unmount in the ink logger #19312

Merged
merged 1 commit into from
Nov 6, 2019

Conversation

vladar
Copy link
Contributor

@vladar vladar commented Nov 6, 2019

Description

This should fix the following warning when gatsby CLI (with ink reporter) exits with an error:

Warning: Can't perform a React state update on an unmounted component.
This is a no-op, but it indicates a memory leak in your application.
To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.

@vladar vladar requested a review from a team as a code owner November 6, 2019 15:55
Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

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

This makes sense. Just with how global gatsby-cli works - users might need to update global gatsby-cli - but there's no way around it.

Thanks!

@pieh pieh merged commit d2fdae0 into master Nov 6, 2019
@delete-merged-branch delete-merged-branch bot deleted the vladar-cli-ink-unmount-fix branch November 6, 2019 23:43
rickiesmooth pushed a commit to rickiesmooth/gatsby that referenced this pull request Nov 8, 2019
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.

None yet

2 participants