react-pouchdb
react-pouchdb copied to clipboard
How to disable live change
Is there any option or way to disable live change in useFind ?
No, but I think it would be useful option. Currently you have to use db.find
and useEffect
. Something like:
function MyComponent() {
const db = useDB();
const [result, setResult] = useState();
useEffect(() => {
async function find() {
setResult(await db.find(/* ... */));
}
find();
}, [db]);
if (!result) {
return null;
}
// ...
}