Framer motion for react, exit animations

Hello FCC. I am hoping someone here has more experience with Framer motion.
I currently have a code like this.

const changepage = {
  start: {
opacity: 0,
y: "100vh",
  },
  in: {
    opacity: 1,
    y: 0
  },
  out: {
    opacity: 0,
    y: "100vh"
  },
};

This works great, the component comes on the page when it is clicked on. The problem is when I click to another page, the current one will simply disappear and the entrance animation of the next page will start.
I am wonder how I could set it so my pages will have an exit animation? I really like how they slide on to the page, now if they could just slide off the page when unmounting it would be perfect.
Can anyone here point me in the right direction? I’ve checked the framer motion documentation and didn’t find what I was looking for.
Thank you in advance.

I think these 2 links might help u out:

1 Like

Thanks, that’s exactly what I was looking for!