TLDW: have a state called loading, initially set to true. On component did mount, make an api call to your backend, when stuff is returned, set loading to false, and the toDisplayData to whatever is returned
In render, display toDisplayData if loading is false, else, display a loading circle
Download
0 formats
No download links available.
React Daily #1: Loading screen with data fetching | NatokHD