• A hook for tracking and updating a property in the state

    Type Parameters

    • StateType extends Record<PropertyKey, unknown>

    Parameters

    • store: Store<StateType>

      The @watchable/store!Store to read the state from.

    • key: keyof StateType

      The key of the state value to track.

    Returns readonly [Immutable<StateType>[keyof StateType], ((value) => void)]

    a tuple with the current value of the state property and a setter function.

Generated using TypeDoc