I'd like to animate changes between routes but limit animation based on the route level if that makes any sense. So if I change between Login and Signup, I don't want to fade in/out the Image component. But if I'm switching between the AppAuth and AppUnauth components, I want the animation to effect the whole page. What's the React way to extend the current AnimatedRoutes functionality to support this nested layout animation?
I have AnimatedRoutes (renamed AnimatedSwitch in my project) in my main App entry point like so:
The AppUnauth and AppAuth components have AnimatedSwitches within them as well, and some layouts that should not be animated and instead be static.
I'd like to animate changes between routes but limit animation based on the route level if that makes any sense. So if I change between Login and Signup, I don't want to fade in/out the Image component. But if I'm switching between the AppAuth and AppUnauth components, I want the animation to effect the whole page. What's the React way to extend the current AnimatedRoutes functionality to support this nested layout animation?