DEV Community

Discussion on: React Hooks vs Svelte - Why I chose Svelte?

Collapse
 
dhinesh03 profile image
Dhinesh Kumar • Edited

@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."

Collapse
 
tombohub profile image
tombohub • Edited

I feel nothing, go and move mouse and let me know when is starts getting slow.

Thread Thread
 
dhinesh03 profile image
Dhinesh Kumar

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.

Some comments have been hidden by the post's author - find out more