Make your Next.js app realtime and collaborative
summary
Builds a realtime polling feature for Next.js using PartyKit and WebSockets, demonstrates running `npm partykit init` to add PartyKit and PartySocket, and shows per-poll in‑memory rooms keyed by poll ID so each new ID spins up a server instance. Uses a client React hook to update votes live, sets revalidate: 0 to avoid caching, increments votes server‑side and broadcasts them, and deploys the working demo to hundreds of edge locations.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:08Why realtime
- 2:57Lets build
- 4:09Setting up the server
- 4:59Sending the form
- 5:46Rendering the poll
- 6:36Using websockets
- 7:43Voting
related talks
30mWebSockets: The Real-Time Avengers
30mUnderstanding the realtime web with websockets
22mMultiplayer Experiences with React
22mEvery Node.js app should have real-time collab features
38mBeyond REST: Using Full-Stack Signals for Real-Time Reactive UIs
49mTaming the Wild Wild West of Next-Gen Front-End Apps
32mVue Real-Time Apps
24mBuilding Realtime Singlepage Apps
