logoalt Hacker News

molftoday at 10:30 AM2 repliesview on HN

Yes absolutely.

It's brilliant: all useMemo and useCallback can be removed and you get the same runtime performance and then some, at the cost of only a slight increase in code size.

A small downside at the moment is the build time. This change will hopefully help address that because it will no longer depend on babel.


Replies

DanielHBtoday at 12:22 PM

I haven't tried the compiler yet, but I been very skeptical of the automatic memoization features. Both in that sometimes the default strategy to decide when to memoize is not good enough but also the hidden flow to trigger the memoization causing hard to spot performance regressions.

I would be interest to hear how it worked out for you.

show 1 reply
_the_inflatortoday at 11:14 AM

Very insightful, thanks. I just delved into it, starting here: https://react.dev/learn/react-compiler/introduction