Skip to main content

Class: Storage

storage.Storage

Hierarchy​

  • ReactantStorage

    ↳ Storage

Constructors​

constructor​

• new Storage(portDetector, options)

Parameters​

NameType
portDetectorPortDetector
optionsIStorageOptions

Overrides​

BaseReactantStorage.constructor

Defined in​

packages/reactant-share/src/storage.ts:23

Properties​

[storeKey]​

• Optional Readonly [storeKey]: Store<any, AnyAction>

Inherited from​

BaseReactantStorage.__@storeKey@153774

Defined in​

packages/reactant-module/src/core/plugin.ts:15


blacklist​

• Protected blacklist: string[]

Inherited from​

BaseReactantStorage.blacklist

Defined in​

packages/reactant-storage/src/storage.tsx:52


enhancer​

• Optional enhancer: Function

inject enhancer for Redux

Inherited from​

BaseReactantStorage.enhancer

Defined in​

packages/reactant-module/src/core/plugin.ts:32


manualPersist​

• manualPersist: boolean = false

manual persist

Inherited from​

BaseReactantStorage.manualPersist

Defined in​

packages/reactant-storage/src/storage.tsx:180


middleware​

• Optional middleware: Middleware<{}, any, Dispatch<AnyAction>>

inject middleware for Redux

Inherited from​

BaseReactantStorage.middleware

Defined in​

packages/reactant-module/src/core/plugin.ts:27


options​

• options: IStorageOptions

Inherited from​

BaseReactantStorage.options

Defined in​

packages/reactant-share/src/storage.ts:25


paused​

• paused: boolean = false

persistence paused

Inherited from​

BaseReactantStorage.paused

Defined in​

packages/reactant-storage/src/storage.tsx:185


persistConfig​

• Protected persistConfig: Record<string, PersistConfig<any, any, any, any>> = {}

Inherited from​

BaseReactantStorage.persistConfig

Defined in​

packages/reactant-storage/src/storage.tsx:70


persistRootConfig​

• Protected persistRootConfig: Pick<IStorageOptions, "version" | "serialize" | "timeout" | "storage" | "keyPrefix" | "blacklist" | "whitelist" | "transforms" | "throttle" | "migrate" | "stateReconciler" | "getStoredState" | "debug" | "writeFailHandler" | "loading"> & { key: string }

Inherited from​

BaseReactantStorage.persistRootConfig

Defined in​

packages/reactant-storage/src/storage.tsx:72


persistor​

• Optional persistor: Persistor

Inherited from​

BaseReactantStorage.persistor

Defined in​

packages/reactant-storage/src/storage.tsx:54


portDetector​

• Protected portDetector: PortDetector

Defined in​

packages/reactant-share/src/storage.ts:24


rehydrateCallbackSet​

• Protected rehydrateCallbackSet: Set<() => void>

Inherited from​

BaseReactantStorage.rehydrateCallbackSet

Defined in​

packages/reactant-storage/src/storage.tsx:243


rehydrated​

• rehydrated: boolean = false

Inherited from​

BaseReactantStorage.rehydrated

Defined in​

packages/reactant-storage/src/storage.tsx:56

Methods​

_onRehydrated​

▸ Protected _onRehydrated(): void

Returns​

void

Inherited from​

BaseReactantStorage._onRehydrated

Defined in​

packages/reactant-storage/src/storage.tsx:245


afterCombineRootReducers​

▸ afterCombineRootReducers(rootReducer): Reducer<any, AnyAction>

Parameters​

NameType
rootReducerReducer<any, AnyAction>

Returns​

Reducer<any, AnyAction>

Inherited from​

BaseReactantStorage.afterCombineRootReducers

Defined in​

packages/reactant-storage/src/storage.tsx:167


afterCreateStore​

▸ afterCreateStore(store): Store<any, AnyAction>

Parameters​

NameType
storeStore<any, AnyAction>

Returns​

Store<any, AnyAction>

Inherited from​

BaseReactantStorage.afterCreateStore

Defined in​

packages/reactant-storage/src/storage.tsx:187


beforeCombineRootReducers​

▸ beforeCombineRootReducers(reducers): ReducersMapObject<any, Action<any>>

Parameters​

NameType
reducersReducersMapObject<any, Action<any>>

Returns​

ReducersMapObject<any, Action<any>>

Inherited from​

BaseReactantStorage.beforeCombineRootReducers

Defined in​

packages/reactant-storage/src/storage.tsx:131


getRehydrated​

▸ getRehydrated(target): any

get every module rehydrated

Parameters​

NameType
targetobject

Returns​

any

Inherited from​

BaseReactantStorage.getRehydrated

Defined in​

packages/reactant-storage/src/storage.tsx:120


onRehydrated​

▸ onRehydrated(callback): void

onRehydrated

callback function will be called after rehydration is finished.

Parameters​

NameType
callback() => void

Returns​

void

Inherited from​

BaseReactantStorage.onRehydrated

Defined in​

packages/reactant-storage/src/storage.tsx:259


preloadedStateHandler​

▸ Optional preloadedStateHandler(preloadedState): Object

preloaded state handler for Redux

Parameters​

NameType
preloadedStateObject

Returns​

Object

Inherited from​

BaseReactantStorage.preloadedStateHandler

Defined in​

packages/reactant-module/src/core/plugin.ts:20


provider​

▸ provider(props): Element

Parameters​

NameType
propsObject
props.children?ReactNode

Returns​

Element

Inherited from​

BaseReactantStorage.provider

Defined in​

packages/reactant-storage/src/storage.tsx:267


setStorage​

▸ setStorage<T>(target, options): void

set module to storage persistent

Type parameters​

NameType
Textends object

Parameters​

NameType
targetT
optionsSetStorageOptions<T>

Returns​

void

Inherited from​

BaseReactantStorage.setStorage

Defined in​

packages/reactant-storage/src/storage.tsx:86