6 ms·
Great work, I've been enjoying using this exact stack recently - this has definitely taught me a few things. The main thing I'm still trying to get my head rou
by tom_usher 11y ago
Great work, I've been enjoying using this exact stack recently - this has definitely taught me a few things.
The main thing I'm still trying to get my head round with React/Redux/Router is where in the lifecycle to do data fetching - I noticed you're doing it in componentWillMount, when the React docs suggest componentDidMount, and I've seen others do it in various other ways with no clear indication what the 'best practice' approach is.
- pergomes 11y agoI understand your thoughts and normally we follow the React docs suggestions for generic components. We place data fetching code in componentWillMount in those cases we want to win some time, but if it's not the case I would recommend to place it in componentDidMount as React docs suggests.