Heckel
KembaliBack

Moving to Next.js

17 December 2024

17 Desember 2024

en

Moving this page to Next.js! I decided to try out the new Next.js release with its shining features: Turbopack, Serve Actions, and React Server Component (RSC).

Review: 2/5 ⭐

The Good:

RSCs are absolutely game-changing! The concept of components fetching their own data on the server is the GOAT. It's like having the best of the both worlds—efficient data fetching and seamless component rendering. RSC truly feel like the future of React development.

Server Actions? Also brilliant. No more setting up extra API endpoints just to handle some basic server calls. It's clean, intuitive, and makes my codebase less clutteered. Compared to Remix, where you're stuck loading data and handling actions at the route level, this feels like a significant step forward. Which is honestly a weird/mistake abstraction. They should seriously consider adopting this new React achitecture to improve their developer experience (DX)!

The Bad:

Let's talk about Turbopack. For something marketed as "blazingly fast", it feels… slow. Compared to Vite, a bundler that's genuinely blazingly fast, Turbopack is painfully sluggish. Every time I edit a file in my editor, I have to manually refresh the browser to see the changes. Isn't it supposed to be hot-reloaded?

To make matters worse, Next.js dev mode eats a ton of memory. My low-end laptop struggles to handle it—it's almost unusable. And don't get me started on the production build. It managed to go even slower af, and it also caused issues on my Windows machine. It feels like Next.js is hostile towards Windows users, which is frustrating.

Final Thoughts:

Given all these issues, I think I'll move this site to React Router v7. I've been eyeing Tanstack Start, but it's still in beta, and its Cloudflare integration is pretty minimal. So, for now, React Router it is! 🥳