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: state update on an unmounted component #522

Merged
merged 1 commit into from
Mar 9, 2021

Conversation

astahmer
Copy link
Contributor

@astahmer astahmer commented Mar 9, 2021

No description provided.

@update-docs
Copy link

update-docs bot commented Mar 9, 2021

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update some of our documentation based on your changes. You can run yarn generate-docs to generate some!

@codecov
Copy link

codecov bot commented Mar 9, 2021

Codecov Report

Merging #522 (485d4e0) into master (b84857e) will increase coverage by 0.31%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #522      +/-   ##
==========================================
+ Coverage   95.00%   95.31%   +0.31%     
==========================================
  Files           1        1              
  Lines          60       64       +4     
  Branches       13       15       +2     
==========================================
+ Hits           57       61       +4     
  Misses          2        2              
  Partials        1        1              
Impacted Files Coverage Δ
src/AuthContext.tsx 95.31% <75.00%> (+0.31%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b84857e...485d4e0. Read the comment docs.

Copy link
Member

@simenandre simenandre left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this pull request! 🎉

I left some nitpicking.

Comment on lines +96 to +100
useEffect(() => {
return () => {
isMountedRef.current = false;
};
}, []);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
useEffect(() => {
return () => {
isMountedRef.current = false;
};
}, []);
useEffect(() => () => {
isMountedRef.current = false;
}, []);

@simenandre simenandre merged commit 0e873f4 into bjerkio:master Mar 9, 2021
github-actions bot pushed a commit that referenced this pull request Mar 9, 2021
## [1.2.1](v1.2.0...v1.2.1) (2021-03-09)

### Bug Fixes

* state update on an unmounted component ([#522](#522)) ([0e873f4](0e873f4))
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2021

🎉 This PR is included in version 1.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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