If the module is big, the user will see a slight delay.
Voon Ming Hann

Well, yeah. That’s possible. You can use the route enter hook of a react-router’s route and then trigger a loader in your root component (say App.jsx) and then in the componentDidMount, turn it off by dispatching a redux action (if you’re using redux) or event emitter otherwise. Only condition is it’s a child component of something (like App in our case).

Show your support

Clapping shows how much you appreciated Param Singh’s story.