Creates a hook similar to useRGS, but with plugins to be applied on first invocation.

  • Type Parameters

    • T

    Parameters

    • plugins: Plugin<T>[]

      Plugins to be applied to the store.

    Returns <U = T>(key: string, value?: U, doNotInit?: boolean) => [U, SetStateAction<U>]

    A hook that automatically initializes the store (if not already initialized) with the given plugins.