Full Stack Web Dev | Diving into mobile dev and content creation.
Hi, I am Rahul
Loves to πread, π§listen and π·talk.
GitHub: github.com/holdmypotion
Thank you so much :)
I did. It does sometimes lag on the initial paint. I'll try to update the blog if I find a solution for that. Do you have something in mind?
Yeah i was tinkering with the same effect but using refs instead:
constcursorRef=React.useRef<HTMLDivElement>(null!);constmoveListener=React.useCallback((event)=>{const{clientX,clientY,target}=event;if(target==='target-id'){// some custom logic to change cursor icon in here}constmouseX=clientX-cursorRef.current.clientWidth/2;constmouseY=clientY-cursorRef.current.clientHeight/2;})return<divclassName='custom-cursor'ref={cursorRef}/></div>;
I dont get the lag with this method, but i'm hitting a bug with css animations when doing this method π
Nice, I like this a lot! Did you notice some janky behaviour when using the delayed animation? re:
transition-duration: 100ms;
Thank you so much :)
I did. It does sometimes lag on the initial paint. I'll try to update the blog if I find a solution for that. Do you have something in mind?
Yeah i was tinkering with the same effect but using refs instead:
I dont get the lag with this method, but i'm hitting a bug with css animations when doing this method π
is it in the hooks file