Skip to content

CTNicholas/nextjs-realtime-cache-update

Repository files navigation

Liveblocks + Next.js real-time caching

This demo shows you how to implement real-time Next.js caching/revalidating with Liveblocks. No data is stored on Liveblocks to make this work, it simply tells other users to refresh their data from your database.

HJcKUV8Kx9.mp4

Set up Liveblocks

  • Install all dependencies with npm install
  • Create an account on liveblocks.io
  • Copy your secret key from the dashboard
  • Create an .env.local file and add your secret key as the LIVEBLOCKS_SECRET_KEY environment variable
  • Run npm run dev and go to http://localhost:3000