@tauri-store/svelte - v2.1.1
    Preparing search index...

    Class RuneStore<S>

    A reactive store that can sync its state with the Rust backend and persist it to disk.

    import { RuneStore } from '@tauri-store/svelte';

    const store = new RuneStore('counter', { count: 0 });

    // Start the store, allowing it to sync with the backend.
    await store.start();

    export function increment() {
    store.state.count += 1;
    }

    Type Parameters

    Hierarchy

    • BaseStore<S>
      • RuneStore

    Implements

    Index

    Constructors

    Properties

    id: string
    state: S = ...

    Methods

    • Starts the store synchronization.

      Returns Promise<void>

    • Stops the store synchronization.

      Returns Promise<void>