How to implement authenticated routes in React Router 4?

You’re going to want to use the Redirect component. There’s a few different approaches to this problem. Here’s one I like, have a PrivateRoute component that takes in an authed prop and then renders based on that props. Now your Routes can look something like this If you’re still confused, I wrote this post that may help – Protected routes and … Read more