I am learning how to use Reactjs and I read the following post :
https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#fetching-external-data
When componentWillMount is used, it is written that The above code is problematic for both server rendering (where the external data won’t be used) and the upcoming async rendering mode (where the request might be initiated multiple times).
I do not understand :
- How the request might be initiated multiple times because componentWillMount is used only one time.
- Why componentDidMount solves this problems. For the server rendering, the external data won't be used also in the first render call.