Solid Automerge - v3.0.0
    Preparing search index...

    Function useMutableDocument

    • 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)}
      />
      )

      Type Parameters

      • T extends object

      Parameters

      Returns [doc: T, handle: Accessor<DocHandle<T> | undefined>]

      [doc, handle]