3 ms·
I agree with your 'stateless' approach for many use cases that are otherwise 'muddied' by unnecessary component state. However, instead of calling forceUpdate(
by sarreph 9y ago
I agree with your 'stateless' approach for many use cases that are otherwise 'muddied' by unnecessary component state.
However, instead of calling forceUpdate(), I was under the impression that componentWillReceiveProps(props) was more efficient?
Perhaps I'm wrong on that one, though... Just that forceUpdate() is an approach that is officially encouraged against.[0]
[0] - https://reactjs.org/docs/react-component.html#forceupdate https://reactjs.org/docs/react-component.html#forceupdate