You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For any sveltekit users out there, if you have a dynamic route like /hello-[name] and for every route you know which page comes before and after, how could you apply swiper to allow page transitions? The only approach I could think of would be to have a component that accepts all the needed data for [name] as props and renders the entire page. Then on each individual route you would load 3 of these components, the current one and the previous and next within a swiper container. Then on the slide complete event, you programmatically change the route. So every one of these dynamic routes loads the content for 3 routes.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
For any sveltekit users out there, if you have a dynamic route like
/hello-[name]
and for every route you know which page comes before and after, how could you apply swiper to allow page transitions? The only approach I could think of would be to have a component that accepts all the needed data for[name]
as props and renders the entire page. Then on each individual route you would load 3 of these components, the current one and the previous and next within a swiper container. Then on the slide complete event, you programmatically change the route. So every one of these dynamic routes loads the content for 3 routes.Beta Was this translation helpful? Give feedback.
All reactions