Skip to content

Documentation / @warp-drive/core / useRecommendedStore

Function: useRecommendedStore()

ts
function useRecommendedStore<T>(options, StoreKlass): typeof ConfiguredStore;

Defined in: core/src/index.ts:130

Creates a configured Store class with recommended defaults for schema handling, reactivity, caching, and request management.

ts
import { useRecommendedStore } from '@warp-drive/core';
import { JSONAPICache } from '@warp-drive/json-api';

export const Store = useRecommendedStore({
  cache: JSONAPICache,
  schemas: [],
});

Type Parameters

T

T extends Cache

Parameters

options

StoreSetupOptions<T>

StoreKlass

typeof Store = Store

Returns

typeof ConfiguredStore

Released under the MIT License.