DEV Community

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

Collapse
 
cannon303 profile image
cannon303 • Edited

Hi I noticed with your website that the page transitions work great but I wanted to ask if this is achievable: When you go to your home page and scroll down to, for example: Featured Projects section, if you then click the Portfolio link in the top navigation the transition to that page works fine but if you then click the back button on the browser what I would expect to see is the home page scrolled down to the Featured Projects section where I last left the page but instead you end up back at the top of the home page with another transition. I probably wouldn't even expect to see the transition again either but the more important task is to be able to go back to the point you last scrolled the page when you click the browser back / forward buttons. Is that achievable with Framer Motion?