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.
- SWR (src: https://github.com/yo-iwamoto/swr-vs-sc-approuter/tree/main/src/app/pattern-1)
- Server Components (src: https://github.com/yo-iwamoto/swr-vs-sc-approuter/tree/main/src/app/pattern-2)
- Sign up
- Create Post
- Like Post
- Follow User
- View Timelie
pnpm i
pnpm db:push
pnpm db:seed
pnpm dev
Now you can open http://localhost:3000 in your browser.
pnpm run test