motia
motia copied to clipboard
feat(ui): enable React Compiler
Summary
This PR begins the migration of Motia UI from manual memoization (memo, useMemo, useCallback) to React Compiler.
React Compiler is enabled for the UI layer as the first step of the migration, establishing a stable foundation before rolling it out across the rest of the codebase.
Related Issues
Closes #940
Changes Included
- Added
babel-plugin-react-compileras a dev dependency - Enabled the compiler via Vite config in
packages/ui/vite.config.ts
react({
babel: {
plugins: ['babel-plugin-react-compiler'],
},
});
⚠️ Note
Phase 1 only activates the React Compiler. Further phases (if required) will focus on cleanup and performance validation.
Someone is attempting to deploy a commit to the motia Team on Vercel.
A member of the Team first needs to authorize it.