MilkshakeStudio / nuxt-lenis

Nuxt adaptation for @darkroomengineering/lenis
https://github.com/darkroomengineering/lenis
30 stars 4 forks source link

Improve Vue lifecycle integration #5

Closed felixdenoix closed 9 months ago

felixdenoix commented 9 months ago

Changed the usage of the props in the lenis component to ensure it reacts to props changes. Also added code to ensure the raf is canceled in the same time the component is destroyed. Added a second page to trigger the onDestroy hook and a child component to fiddle with the page height and trigger the onUpdate hook. (the second commit can be removed)