#React Router and Time
1 messages · Page 1 of 1 (latest)
1 messages · Page 1 of 1 (latest)
Hello everyone,
i have not found any information regarding time and react router.
Is there a possibility to change a route depending on the current time.
For example show at 12p.m. /afternoon, 6 p.m /night, 6 a.m. /lateMorning?
Thanks for your help.
Youll need a useEffect on the parent route to do this
Use a setInterval to check the current time every minute or so, then navigate based on it
Okay. Thank you. I thought there is a built in solution.