Comment Comment by TurningCanadian For a deep dive: https://dev.to/n1ru4l/homebrew-react-hooks-useasynceffect-or...I think the current best answer is https://github.com/n1ru4l/use-async-effectBut as noted by your SO question, Suspense for data fetching is what we're waiting for. It was originally scheduled to be released the middle of this year but was delayed. https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#an-up... parent TurningCanadian 7 years ago
I think the current best answer is https://github.com/n1ru4l/use-async-effect
But as noted by your SO question, Suspense for data fetching is what we're waiting for. It was originally scheduled to be released the middle of this year but was delayed. https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#an-up...