title: How to add loading effect in reactjs?
body: <p>I'm creating a website using mern stack. In react files, I'm using many hooks, in useState hook, it takes some time to change and set new state. So, for that time it's showing data before changed state. I want to give some loading effect for the time till useState change the state and show data. What is the short and simple way to create that effect?</p>