stephenscaff / react-animated-cursor

An animated custom cursor React component.
ISC License
309 stars 30 forks source link

Support for server components nextjs #44

Closed mpotane closed 1 year ago

stephenscaff commented 1 year ago

Thanks for bringing this up. Can you tell me a bit more?

If I understand things correctly, looking at this chart, a component like this can't be a server component, as it has interactivity (onMouseOver, onClick, etc) and uses State and side effects (useState(), useEffect()).

Seems it needs to be Client Component (adding 'use client' to top of file).

I have to do some experimenting with a new next build. Did you have a repo / test case to share?

mpotane commented 1 year ago

Closing for now