正在加载视频...
视频加载失败
Reminder: you can enable React compiler in Next 15
92,554 次观看 • 1 年前 •via X (Twitter)
10 条评论

So next js is slow without it

Nope. In practice, most renders are fine. However, sometimes excessive rendering could lead to performance bottlenecks. You can fix them with memoization (memo, useCallback, uesMemo, etc...). Compiler does all that optimization automatically, so you don't need to think about it

breaks many more complex components of ours

Wo, whats that tailwind collapse plugin?

@vercel @leeerob @rauchg is there a way to get react compiler benefits with NextJS v14? I started my project on fall and I am not yet ready to upgrade to v15 😂

Awesome didn’t know this thx

So it's not enabled by default? When it's gonna be out of experimental? Once React 19 stabilizes?

Not enabled by default and requires babel-plugin-react-compiler. Here is a roadmap to stable

Is React compiler enabled in the Next config file

It's in the video: 22s - 25s 😅
