Feb 24, 2017 · 1 min read
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).
