Skip to content

Documentation / @warp-drive/core / useRecommendedStore

Function: useRecommendedStore()

ts
function useRecommendedStore(options, StoreKlass): typeof Store;

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

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: [],
});

Parameters

options

StoreSetupOptions

StoreKlass

typeof Store = Store

Returns

typeof Store

Released under the MIT License.