Coding

31
12

NextJS 13 App Router Simple Todos

Last month I decided to check out the Next 13 app router and see what it had to offer with RSC.

I put together this simple Todo app to test it out

RSC & Next
It took a bit of hacking to understand the concept of client vs server components with NextJS. It definitely wasn't clear to me initially that client components would still be pre-rendered in Next and hydrate the users browser afterwards (which would work like the previous pages router).

Data fetching in server components feels great and being able to use caching on a "per fetch" level is a huge improvement over the page router.

I'm looking forward to testing out server actions when they are a bit more battle tested and leave beta.

API Routes
The app router version of API routes seem's way better then the page router version. Exporting CRUD methods just makes sense and gives it a rails-esque feel which I liked.