In the below image, I have a .js file with Private routes and I wanna include in the App.js which limits a user from going to a certain url if they are not logged in. I have trouble bringing the idea in the V6 react-router-dom. I have tried couple of methods but it fails. I think because I have another UserContext.Provider Which I only use it to createContext().
Asked
Active
Viewed 12 times