Adding support for page transitions when navigating using the View Transitions API #372
hawkerboy7
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
Hi @ryansolid, |
Beta Was this translation helpful? Give feedback.
1 reply
-
SvelteKit implemented |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
Right now I have the code below to be able to have page transitions when navigating using the View Transitions API.
Tough it works, to me this does not really seem to be the way it should be done and @mishimalisa also noted it might not always work due to asynchronicity.
Would the following be a viable method to support this behaviour (credits to @mishimalisa)?
In which
useBeforeRouterTriggersDOMChanges
will trigger just before SolidJS changes the DOM as a result of navigationand
triggerTheChangesToTheDOM
is a function which will trigger SolidJS to start changing the DOM.EDIT: Adjusted function names to better reflect what happens
Beta Was this translation helpful? Give feedback.
All reactions