DEV Community

Discussion on: Animating Next.js page transitions with Framer Motion

Collapse
 
imcorfitz profile image
Corfitz

Great post! One quick Q though - how would you come about triggering transitions between routes on the same page? Imagine between two posts both located on /blog/[slug].tsx. In my case, I have a headless CMS, fetching all pages in a [[...params]].tsx route, which means that majority of route changes all happen within the same page file. It works fine when going from the static 404.tsx page, but not between pages using the same [[...params]].tsx route. Any great ideas?