I am... more and more disliking React for making me have to think about performance as much. I don't want to have to wrap click handlers in useCallback() or useEvent(). I don't want to have to wrap components in react.Memo. It feels like that's a lot of extra boilerplate and mental overhead that I think the framework should manage for me.
They are working on a compiler (React Forget) that will automate all of the memoization stuff for you. So at some point down the road I expect we'll be able take our current components and just delete all of the useCallback/useMemo code.
Nice idea. Terrible name. I can think of many places I’d use this that have nothing to do with events.
I’ve not thought too deeply about how this will work in practice, but seems like a good step towards solving the confusing situation with the useEffect dependency array needing to contain things that you don’t actually want to the effect to re-run for (which I think could perhaps have been designed better up front, I find it pretty confusing to deal with and I’ve been doing React for over 8 years…)