logoalt Hacker News

willsmith72today at 9:57 AM6 repliesview on HN

Are people actually using the react compiler?

Haven't heard about since ages ago when it was extremely slow


Replies

molftoday at 10:30 AM

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.

show 2 replies
veidelistoday at 12:38 PM

My company tried it but reverted the changes. The biggest reasons - it's not compatible with mobx and we didn't notice any perf gains on an existing codebase.

esperenttoday at 11:52 AM

I think the reason you haven't heard about it is that it just works. It's fast - with Vite 8 my moderately large app compiles in ~800ms, which includes typescript, react compiler etc.

I also took a step to clean out all memo, useMemo, useCallback across the app and so far have not run into any issues from doing this.

Ambroostoday at 11:54 AM

We started using it for unifi.ui.com and the render performance gain has been massive.

paavohtltoday at 10:15 AM

We have used React Compiler in production for a large ecom / media website for about a year. Performance has been fine overall, and we haven't ran into any major bugs attributable to it in that time.

pjmlptoday at 11:59 AM

Yes, and no. For some of us, there are projects with Next.js we cannot get away from, but those use Vercel stuff, also written in Rust.

Not sure how they relate to each other.

show 1 reply