Open sakin opened 7 years ago
that looks correct... where are you calling findDOMNode
?
this is coming from here i think.
So if you call scrollToComponent
inside your render
you will get this warning.
For me the following code made this error:
ReactDOM.findDOMNode(this.refs.textInput).focus();
I fixed the issue with this:
this.refs.textInput.focus();
My code looks like this:
constructor(props) { super(props); this.textInput = null; }
render() { return <input ref="textInput" />; }
Warning: {COMPONENT} is accessing 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.
I could be doing it wrong, my ref looks like this: `<tr ref={row => { this.row = row; }}