-
Notifications
You must be signed in to change notification settings - Fork 172
Description
When using, for example solid-transition-group to implement enter/exit transitions on route changes, e.g.,
...
<Transition {transitionProps}>
<Routes />
</Transition>
...
it is useful to use a different set of transitionProps for the enter and the exit animations. The exact set of props can be determined by comparing the old route to the new one (for example, going from master to detail usually involves an enter transition, while going back an exit one) and currently there is no way to do that. For example useLocation() and other hooks trigger after the routing transaction has ended: to late to change in any way the props passed to <Transition> or to inlfuence the DOM changes or CSS animations.
I think that implementing an hook that triggers at the start of the routing transaction would be extremely useful to help synchronize DOM animations with route changes.