@tauri-store/valtio - v3.2.0
    Preparing search index...

    Interface Store<S>

    Wrapper for the Valtio proxy state.

    interface Store<S extends State> {
        id: string;
        state: S;
        start(): Promise<void>;
        stop(): Promise<void>;
        subscribe(
            callback: (unstable_ops: Op[]) => void,
            notifyInSync?: boolean,
        ): Fn;
        subscribeKey<Key extends string | number | symbol>(
            key: Key,
            callback: (value: S[Key]) => void,
            notifyInSync?: boolean,
        ): Fn;
    }

    Type Parameters

    Hierarchy

    • BaseStore<S>
      • Store
    Index

    Properties

    id: string
    state: S

    Methods

    • Starts the store synchronization.

      Returns Promise<void>

    • Stops the store synchronization.

      Returns Promise<void>

    • Parameters

      • callback: (unstable_ops: Op[]) => void
      • OptionalnotifyInSync: boolean

      Returns Fn

    • Type Parameters

      • Key extends string | number | symbol

      Parameters

      • key: Key
      • callback: (value: S[Key]) => void
      • OptionalnotifyInSync: boolean

      Returns Fn