Next JS

Next JS is a React framework that provides more full stack functions.

Page vs App Router

The page router helped popularize Next.js, using directories with a page.js file to set up routes.

The new app router is more dynamic and brings the simple setup to other API calls.

Server Actions

Server actions make it easier to set up API calls by automatically setting up things you would otherwise have to do manually with a route handler. Instead of defining your server side code at a route, you can export them into other server components.

  • Caveat: I had to use node v20 to get server actions to work. The docs have not yet been updated to say this.
Level