React18 Loaders
    Preparing search index...

    Function treeshakable

    • Creates a tree-shakable store.

      Type Parameters

      • T

        The type of the store

      Parameters

      • key: string

        A unique key for the store

      • storeCreator: () => T

        A function that creates a new store

      Returns T

      A tree-shakable store

      const store = treeshakable('my-store', () => createStore(...));