Cuberto / mouse-follower

A powerful javascript library to create amazing and smooth effects for the mouse cursor on your website.
MIT License
724 stars 60 forks source link

Cursour saved on link relocate nextjs #23

Closed rstp-god closed 1 year ago

rstp-god commented 1 year ago

Hello! I have problem with links inside nextjs, when u click on Link with cursor, it wiil be save on new page that you relocate. Try to set hideOnLeave at manually set data-cursor-text="" still do not working

Here we click on link with cursor: image

Here how i set text on hover: image

Here new page with same cursour: image

mouse-follower version : 1.1.2 nextjs version : 13.0.5 react 18.2.0 gsap: 3.11.3

Drafteed commented 1 year ago

You need to use the onLeave hook (e.g. routeChangeStart) in Next.js and reset all cursor states.

rstp-god commented 1 year ago

@Drafteed Ty! This just really help me out!