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
Watch video React Daily #1: Loading screen with data fetching (pt 2) online without registration, duration hours minute second in high quality. This video was added by user Andrew Chen 14 August 2019, don't forget to share it with your friends and acquaintances, it has been viewed on our site 84 once and liked it 0 people.