📅  最后修改于: 2022-03-11 15:02:15.985000             🧑  作者: Mango
The best place to make calls to fetch data is within componentDidMount().
componentDidMount() is only called once, on the client, compared to
componentWillMount() which is called twice, once to the server and
once on the client. It is called after the initial render when the
client received data from the server and before the data is displayed
in the browser.