📄️ useLiveQuery
useLiveQuery is a React hook that provides access to live query results, enabling real-time updates in your app. For a step-by-step tutorial building an app with useLiveQuery, check out the React tutorial.
📄️ useDocument
You can also subscribe directly to ledger updates, and automatically redraw when necessary. When sync is enabled you'll have both parties updating the same ledger in real-time. Here's an example of a simple shared text area (in real life you'd probably want to use an operational transform library like Yjs or Automerge for shared text areas, which both work great with Fireproof).
📄️ useFireproof
The useFireproof hook provides access to Fireproof's React hooks and ledger instance. You'll use it to get the useLiveQuery and useDocument hooks configured for your application.