How to show a loading screen while logging in in React.

  1. Create your Login Page and setup your Post request.Here’s a snippet of my handleSubmit function. I’m using Axios to make a post request here.
handleSubmit function for when a user is signing up
importing the spinner component
React hook to track the state of our logging in.
rendering if the state is logging in.
Before
After applying spinner

--

--

Growth at Moni(YC W22) | Adebola.dev

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store