yo-iwamoto / swr-vs-sc-approuter

SWR vs Server Components for server state management on App Router

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yo-iwamoto/swr-vs-sc-approuter

SWR vs Server Components for server state management on App Router.

Important

For clarity, the use of Server Actions in this repository omits authentication processes. However, in practice, Server Actions require authentication each time they are used. Please be cautious if you're referencing this code.

https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations#authentication-and-authorization

Status

Feature

  • Sign up
  • Create Post
  • Like Post
  • Follow User
  • View Timelie

CleanShot 2024-03-20 at 12 04 54

Getting Started

pnpm i

pnpm db:push

pnpm db:seed

pnpm dev

Now you can open http://localhost:3000 in your browser.

Unit test

pnpm run test

About

SWR vs Server Components for server state management on App Router


Languages

Language:TypeScript 99.0%Language:JavaScript 0.8%Language:Shell 0.1%Language:CSS 0.1%