diff --git a/packages/react/src/setup.ts b/packages/react/src/setup.ts index a3cd274..52fbc30 100644 --- a/packages/react/src/setup.ts +++ b/packages/react/src/setup.ts @@ -20,24 +20,24 @@ type Config = { defaultLocale: Locale | (() => Locale) loader: Loader format?: GlobalFormat - persistence?: boolean - persistenceKey?: string + persist?: boolean + storageKey?: string } export const config$ = observable() export function setupTerai({ defaultLocale, - persistence = false, - persistenceKey = `terai-${pkg.version}`, + persist = false, + storageKey = `terai-${pkg.version}`, ...options }: Config) { - if (persistence) { + if (persist) { configureObservablePersistence({ pluginLocal: ObservablePersistLocalStorage }) persistObservable(state$, { - local: persistenceKey + local: storageKey }) } @@ -50,8 +50,8 @@ export function setupTerai({ config$.set({ defaultLocale, - persistence, - persistenceKey, + persist, + storageKey, ...options }) } diff --git a/packages/react/src/use-ts.ts b/packages/react/src/use-ts.ts index 2a31953..1349bd6 100644 --- a/packages/react/src/use-ts.ts +++ b/packages/react/src/use-ts.ts @@ -35,7 +35,7 @@ export const useTs = ({ chunkId }: UseTsProps = {}) => { }) } - if (config.persistence) { + if (config.persist) { useEffect(() => { loadDictionary({ locale,