Fix warning: "componentWillReceiveProps has been renamed and is not recommended for use”. componentWillReceiveProps is a synchronous hook. Calling asynchronous function like data fetching inside this hook will need to render in between when the new props are set and when data has finished loading.
Fix warning: "componentWillReceiveProps has been renamed and is not recommended for use”. componentWillReceiveProps is a synchronous hook. Calling asynchronous function like data fetching inside this hook will need to render in between when the new props are set and when data has finished loading.
Use componentDidUpdate to fix this.