mui / base-ui

Base UI is an open-source library of accessible, unstyled UI components for React.
MIT License
288 stars 47 forks source link

[core] Adopt react compiler? #809

Open oliviertassinari opened 2 weeks ago

oliviertassinari commented 2 weeks ago

Summary

Per https://youtu.be/qd5yk2gxbtg?t=1061&si=ZueAd7hJ3rvYQBod we might want to explore adopting the react compiler.

The main question is does this even make sense? I suspect that we need to cherry-pick the optimizations that help and opt out of the harmful ones (extra bundle size, wasted CPU cycles, extra memory), using some sort of test app. Because we are almost exclusively leaf components, maybe this could be mostly harmful, not having much in the render tree that is pruned.

Another blocker is the overall community interest in this, which seems low: https://npm-stat.com/charts.html?package=babel-plugin-react-compiler&package=eslint-plugin-react-compiler for now.

The action plan would involve:

Examples

Motivation

Performance.

Search keywords: -