Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-compiler #246

Open
chalabi2 opened this issue Feb 6, 2025 · 0 comments
Open

react-compiler #246

chalabi2 opened this issue Feb 6, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request post-launch

Comments

@chalabi2
Copy link
Collaborator

chalabi2 commented Feb 6, 2025

Improve Performance & Build Times with React Compiler, Vite Migration, and Tailwind v4

Summary

We should leverage the React Compiler to automatically optimize our React code by using useMemo, useCallback, and React.memo where appropriate. This will enhance performance by ensuring hooks, functions, and data are properly memoized, reducing unnecessary re-renders.

Additionally, we should consider migrating to Vite instead of upgrading to Next.js 15 (react-compiler is only compatible with nextJs 15), as we are not utilizing Next.js server functions or full-stack capabilities. Vite will provide faster build times and better routing, allowing us to integrate TanStack Router and TanStack Start for improved routing management.

While making these updates, we should also upgrade to Tailwind v4 to take advantage of its latest optimizations and features.

Proposed Changes

  1. Enable the React Compiler to optimize our React code automatically.
  2. Migrate from Next.js to Vite for better performance and DX.
    • Faster build times.
    • Improved routing with TanStack Router & TanStack Start.
  3. Upgrade Tailwind to v4 for enhanced styling capabilities.

Benefits

✅ Improved app performance via automatic memoization.
✅ Faster builds and hot reload times with Vite.
✅ Cleaner, more efficient routing with TanStack Router.
✅ Future-proof styling with Tailwind v4.

Next Steps

  • Assess compatibility with Vite and identify potential migration challenges.
  • Plan the migration from Next.js to Vite.
  • Enable the React Compiler and test for potential issues.
  • Upgrade Tailwind to v4 and refactor styles as needed.
@chalabi2 chalabi2 added enhancement New feature or request post-launch labels Feb 6, 2025
@chalabi2 chalabi2 self-assigned this Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request post-launch
Projects
None yet
Development

No branches or pull requests

1 participant