useElementScroll is deprecated
ysj151215 opened this issue · comments
Current version: v2.0.0
Error message:
useElementScroll is deprecated. Convert to useScroll({ container: ref }).
Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.
Ran into this error today, and it appears to come from Scrollex's use in useScroll.tsx
. I haven't tested yet @malerba118, but I believe updating useElementScroll
to framer-motion useScroll would resolve.
hey guys, will get a fix in for this shortly 👍
Fixed in 2.0.1!