darkroomengineering / satus

App router Next.js starter template
https://satus.darkroom.engineering/
460 stars 46 forks source link

With r3f scroll rig #20

Closed emalorenzo closed 1 year ago

emalorenzo commented 1 year ago

This PR adds R3F Scroll Rig.

This library uses Lenis for smooth scrolling. It exposes lenis using a custom hook "useScrollbar". Lenis instance is not created nor stored in zustand anymore. Instead just use useScrollbar or useScroll.

I had to bump some dependencies in order for it to work.

clementroche commented 1 year ago

First of all thank you for your PR. Lately we've updated Satus with react-lenis so we don't store lenis in store anymore. r3f-scroll-rig is good for simple use cases but we usually deal with much more complexity so we need low level tools. Satus only includes Studio Freight current and minimal stack and I'm not convinced it fits because r3f-scroll-rig doesn't cover all our needs.