stephenscaff / react-animated-cursor

An animated custom cursor React component.
ISC License
266 stars 26 forks source link

Support for server components nextjs #44

Closed mpotane closed 10 months ago

stephenscaff commented 11 months 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 10 months ago

Closing for now