Having Issues trying to re-direct user based on state , using React-Router
问题 my app component redirects a used based if they are logged in = true, I used an online example after trying various methods, if there is a more simple functional react way to do it, please show me, If user is Logged in , I want them to go to /createpost else I want them to go to the /login route, I want to protect the /createpost route that user has to be logged in, but that is a task for another time, though ideas appreciated.. sandbox: https://codesandbox.io/s/focused-sammet-eitqr my app