Skip to content

Show a Spinner While Loading Data with React and Axios

Updated: at 02:12 PM

Let's face it, the internet can be slow sometimes and you want your browser users to have a good experience when they view your pages. When we are building server side SPA apps, we often first download the html, then that html downloads some JavaScript that includes the Facebook library React, then finally, the JavaScript executes and fetches some data.

In this post, I talk about how the SPA (Single Page App) technology is React from Facebook.  The library that does the REST data call is Axios, and of course the logic is mine.

Read about it all on this post on Medium and don't forget to add some claps if you like it. It's my first post on Medium and I'm trying to decide if that is a good place to write stuff.

 

 

Fetch Data in React With Spinner Only When Necessary

Check out the ORM (Object Relational Mapper) PRISMA. The database access method I use in all my projects