DEV Community

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

Collapse
 
heybett profile image
Luiz Bett

You didn't import your Layout to app.tsx. How you get to animate the entrance this way? In my case, it only animates on full refresh and when putting the components on app.tsx inside a after import it from /components.

Collapse
 
heybett profile image
Luiz Bett

inside a Layout*

Collapse
 
jameswallis profile image
James Wallis

Hi Luiz, I didn't add it to _app.tsx because the elements are animated when they enter and leave the DOM.
Adding them into _app.tsx would make them only animate on a refresh like you've described.