Stores Payload upload files in Cloudflare R2 buckets instead of local disk
Live Preview React
React hook and refresh component for Payload Live Preview in frontend apps
Installation
pnpm add @payloadcms/live-preview-react About
Live Preview React gives a React frontend the hooks it needs to show Payload edits as they are typed. The useLivePreview hook receives the page data from the server, then updates the rendered content each time an editor changes the document in the Payload admin panel, so the preview reflects unsaved changes. A second component, RefreshRouteOnSave, covers the case where a frontend is better off re-running its data fetching: it refreshes the route whenever the document is saved.
Both pieces handle the message exchange with the Payload admin panel, including the ready handshake that tells the admin the preview is listening. The hook also accepts a custom request handler, so requests for related documents can be routed through middleware or transformed before they reach the page. The package is a thin React layer over the core Live Preview client.
Package info
- Package name
@payloadcms/live-preview-react- Latest version
3.94.0- Unpacked size
- 16 kB
- License
- MIT
- Weekly downloads
- 497.2k
- Last publish
- Nov 17, 2026
More from payloadcms
View profileAdds a parent field and breadcrumbs to collections so documents can nest inside each other
Sends Payload server errors and selected HTTP errors to Sentry with user context
Adds an SEO tab with meta title, description, image and search preview to collections
Stores collection uploads in Vercel Blob Storage instead of local disk
Lets one Payload admin panel manage content for many separate tenants
Similar tools
More in Frontend renderingVue composable that wires a Payload Live Preview into a Vue frontend
React admin bar that puts Payload editing controls on your frontend pages
Client SDK that streams live Payload draft edits into a frontend preview
Renders Lexical rich text content from Payload in Astro sites
Manifest, linter and Payload block generator for a design system's components
CLI and registry that installs wired Payload blocks into Next.js projects