This library provides React hooks for watching y-query data. Under the hood, this is a relatively simple wrapper on top of React's [useSyncExternalStore](https://react.dev/reference/react/useSyncExternalStore)
npm install @bensku/y-query-reactsh
npm install @bensku/y-query-react
`Usage
Watch changes to queried data:
`tsx
const rows = useQuery(doc, YourTable, () => any(), [], 'content');return
{rows.map(row => {row.description}
)}
;
`Or watch a single row:
`ts
const row = useRow(doc, YourTable, YourRow, 'content');
``A fully working example application is available at
/examples/react-notepad.