• Accepts an Editor function which will be passed a draft of the current state. The function can manipulate the draft state using normal javascript assignments and operations as if it didn't need to be treated as immutable. When it returns, @watchable/store!Store#write will be called on your behalf with a newly constructed data structure, equivalent to the original plus your edits, but without changing your original.

    Type Parameters

    • State extends unknown

    Parameters

    Returns State

    The resulting new state aligned with your draft changes.