bencripps / react-redux-grid

A React Grid/Tree Component written in the Redux Pattern
http://react-redux-grid.herokuapp.com/
MIT License
446 stars 63 forks source link

Fix `findDOMNode was called on an unmounted component.` #222

Closed sorioinc closed 5 years ago

sorioinc commented 5 years ago

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

codecov-io commented 5 years ago

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%) :arrow_up:

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 commented 5 years ago

Looks good!

sorioinc commented 5 years ago

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