koenbok / Framer

Framer - Design Everything
https://framer.com
MIT License
5.83k stars 477 forks source link

Code change in useTransform() documentation #596

Closed dev-shetty closed 1 year ago

dev-shetty commented 1 year ago

The documentation of useTransform() in Framer React Website

In an example code, we are using useViewportScrolll() which is deprecated (according to VSCode and has been updated to useScroll()). I tried the same snippet with useScroll() and it is working the same.

The code snippet is this

const { scrollY } = useViewportScroll()
const rotate = useTransform(
  scrollY,
  [0, 100],
  [0, 360],
  { clamp: false }
)

Link to the page: useTransform() Docs



P.S.: Accidentally gave the issue in wrong repo so closing it...

dev-shetty commented 1 year ago

Accidentally gave the issue in wrong repo so closing it...