Type alias FunctionPatch<S>

FunctionPatch<S>: ((state: S) => S)

Type Parameters

  • S

    the State type.

Type declaration

    • (state: S): S
    • A Mergerino function patch. This is a function that receives the current state and returns the updated state.

      Example:

      update(state => ({ ...state, { count: 42 }}));
      

      Parameters

      • state: S

      Returns S

Generated using TypeDoc