Skip to content

Fix findDOMNode was called on an unmounted component. #222

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

Merged

Conversation

sorioinc
Copy link
Contributor

Added a flag to track if component is still mounted in order to avoid… calling getScrollWidth (which triggers a findDOMNode) after a component is unmounted. Suggestions comes from a React blog post: https://reactjs.org/blog/2015/12/16/ismounted-antipattern.html

… calling getScrollWidth (which triggers a findDOMNode) after a component is unmounted. Suggestions comes from a React blog post: https://reactjs.org/blog/2015/12/16/ismounted-antipattern.html
@codecov-io
Copy link

codecov-io commented Jan 23, 2019

Codecov Report

Merging #222 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #222      +/-   ##
=========================================
+ Coverage   75.77%   75.8%   +0.03%     
=========================================
  Files         111     111              
  Lines        5110    5117       +7     
  Branches      366     367       +1     
=========================================
+ Hits         3872    3879       +7     
+ Misses        961     959       -2     
- Partials      277     279       +2
Impacted Files Coverage Δ
src/components/layout/FixedHeader.jsx 59.42% <100%> (+1.42%) ⬆️

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 a9d0419...36c33ec. Read the comment docs.

@bencripps bencripps merged commit 367b929 into bencripps:master Jan 27, 2019
@bencripps
Copy link
Owner

Looks good!

@sorioinc sorioinc deleted the avoid-getScrollWidth-call-after-unmount branch January 28, 2019 05:09
@sorioinc
Copy link
Contributor Author

Thanks @bencripps, when do you think this will get published to npmjs.com?

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.

3 participants