react-scrollbars icon indicating copy to clipboard operation
react-scrollbars copied to clipboard

Warning: ScrollbarWrapper is accessing getDOMNode or findDOMNode inside its render().

Open paulle81 opened this issue 9 years ago • 1 comments

Hi there,

Getting the following warning when mounting the component.

Warning: ScrollbarWrapper is accessing getDOMNode or findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.

Seems to be mixins/scrollbar.jsx accessing getDOMNode then directly calling into render causing the problem. Any plans on improving this?

paulle81 avatar Aug 13 '15 15:08 paulle81

Looks like it's somewhere further up the chain (just a method from the mixin).

There's a few things I need to do with this library including re-writing it so it's not a mixin (use ES6 classes) and to have a better API.

So yep, definitely plans on improving this :).

ojame avatar Aug 14 '15 09:08 ojame