like useDocument, but the document is mutable: assign to it and the assignment becomes an automerge change.
const [todo] = useMutableDocument<Todo>(() => props.url)return ( <input type="checkbox" checked={todo.done} onChange={event => (todo.done = event.currentTarget.checked)} />) Copy
const [todo] = useMutableDocument<Todo>(() => props.url)return ( <input type="checkbox" checked={todo.done} onChange={event => (todo.done = event.currentTarget.checked)} />)
a url (or a function that returns one)
Optional
[doc, handle]
like useDocument, but the document is mutable: assign to it and the assignment becomes an automerge change.