Skip to main content


The useCurrentSnapshot hook returns the snapshot that is currently being previewed. Read more information about snapshots here.

Returns null if no snapshot is being previewed.

import { useCurrentSnapshot } from '@pdftron/collab-react'
export function PreviewedSnapshot() {
const snapshot = useCurrentSnapshot()
if(!snapshot) {
return <p>No snapshot is being previewed</p>
return (
<p>Currently previewing {}</p>
<button onClick={() => snapshot.closePreview()}>Close preview</button>