Open JonnyDeates opened 11 months ago
Great catch, seems like there's no workaround atm?
If you find a solution let us know, or just submit a PR.
Ok, I just tried react-scroll on next.js v14.0.1.
It works great for me, only change needed is to use "use client"
I also added a next.js example. https://github.com/fisshy/react-scroll/blob/master/examples/next-js/page.tsx
Hi Fisshy, In the solution above, you are not using Link's "onSetActive()" method. Have you had any success getting scrollSpy to work when Element associated with. link becomes active?
Fisshi's suggestion worked in my project too.
Next JS version: 14.0.4 react-scroll version: 1.9.0
Apologies, I am using react-scroll-parallax, not react-scroll. The fix of "use client" on the component doesn't work. :/
After Nextjs updated to version 13.5 and above react scroll no longer works. They changed how importing works in their system, not sure if it has anything to do here on y'all's side of things, but just want to make sure people are able to track the breaking change from this. https://github.com/vercel/next.js/issues/55794