![wasm-nextjs-react-server-components-80e package icon](/_next/image?url=https%3A%2F%2Fcdn.wasmer.io%2FCACHE%2Fimages%2Ficon%2Fpackage%2Fabe57147-b763-4193-9da5-c9de7384de1f_default_icon%2Fca0826b55a32391a9523e6cfaded82d7.png&w=96&q=75)
Next.js App Router + React Server Components
Try the demo live here: kylekitlinski-wasm-nextjs-react-server-components-80e.wasmer.app.
Note: This app is a clone of Next.js Server Components demo, minimally adapted to run in WinterJS.
Introduction
This is a demo app of the Hacker News website clone, which shows Next.js App Router with support for React Server Components.
Running Locally
pnpm install
pnpm dev
Go to localhost:3000
.
If you want to run it with Wasmer locally, you can do pnpm run edge:build
and then pnpm run edge:preview
.
Deploy on Wasmer Edge
The easiest way to deploy this Next.js Server Side components app is to use the Wasmer Edge.
Live example: https://kylekitlinski-wasm-nextjs-react-server-components-80e.wasmer.app/
First, you'll need to run npm run edge:build
, and then, to deploy to Wasmer Edge:
wasmer deploy
[!NOTE] You will need to have Wasmer installed (check out the docs to install the Wasmer CLI!). You will also need to change the namespace in
wasmer.toml
to your own namespace and app name inapp.yaml
to your own app name.