DEV Community

sundaycrunk
sundaycrunk

Posted on

Answer: How to wait for Firebase data to be fetched before progressing?

Use a state isLoading default true, then set isLoading to false once a snapshot resolves, and show a loading indicator on isLoading true and show your ui when isLoading false. Then you get updates pushed to your state and the user will see the data once it's fully loaded.

Would…

Top comments (0)