@tombohub Actually you don't know about react hooks well. As you mentioned, simply adding onMouseMove will work but it will end up a performance issue due to frequent garbage collections. we might not want to constantly be registering and un registering listeners every single render right?
Still you don't understand ??
Refer the open source code usehooks.com/useEventListener/, Read it line by line. What do you feel now?
To write high performant react hooks app you should know about the react internals. This is what I'm trying to tell developers: "React's learning curve is higher compared to Svelte."
@tombohub Actually you don't know about react hooks well. As you mentioned, simply adding onMouseMove will work but it will end up a performance issue due to frequent garbage collections. we might not want to constantly be registering and un registering listeners every single render right?
Still you don't understand ??
Refer the open source code usehooks.com/useEventListener/, Read it line by line. What do you feel now?
To write high performant react hooks app you should know about the react internals. This is what I'm trying to tell developers: "React's learning curve is higher compared to Svelte."
I feel nothing, go and move mouse and let me know when is starts getting slow.
Please feel free to do it by yourself if you have time :)
If you want to do it in a smarter way, you can use chrome debugger.