• A utility function to get the current value from a given store. It works by subscribing to a store, capturing the value (synchronously) and unsubscribing just after.

    Type Parameters

    • T

    Parameters

    • store: StoreInput<T>

      a store from which the current value is retrieved.

    Returns T

    Example

    const myStore = writable(1);
    console.log(get(myStore)); // logs 1

Generated using TypeDoc