@nosto/search-js
    Preparing search index...

    Function createStore

    • Create a standard Nosto store to manage the state of the app.

      If you use Nosto providers, you don't need to create a store manually.

      Parameters

      • overrides: Partial<State> = {}

        Initial state overrides.

      Returns {
          clearOnChange: <T>(callback: (piece: T) => void) => void;
          getInitialState: () => State;
          getState: () => State;
          onChange: <T>(
              selector: (state: State) => T,
              callback: (piece: T) => void,
          ) => void;
          onInit: (callback: () => void) => void;
          updateState: (newState: Partial<State>) => void;
      }