Class: Storage
Hierarchy
PluginModule
↳
Storage
Constructors
constructor
• new Storage(options
)
Parameters
Name | Type |
---|---|
options | IStorageOptions |
Overrides
PluginModule.constructor
Defined in
packages/reactant-storage/src/storage.tsx:73
Properties
[storeKey]
• Optional
Readonly
[storeKey]: Store
<any
, AnyAction
>
Inherited from
PluginModule.__@storeKey@146725
Defined in
packages/reactant-module/src/core/plugin.ts:15
beforeCombinePersistReducer
• Optional
beforeCombinePersistReducer: () => void
Type declaration
▸ (): void
Returns
void
Defined in
packages/reactant-storage/src/storage.tsx:144
blacklist
• Protected
blacklist: string
[]
Defined in
packages/reactant-storage/src/storage.tsx:64
enhancer
• Optional
enhancer: Function
inject enhancer for Redux
Inherited from
PluginModule.enhancer
Defined in
packages/reactant-module/src/core/plugin.ts:32
manualPersist
• manualPersist: boolean
= false
manual persist
Defined in
packages/reactant-storage/src/storage.tsx:221
middleware
• Optional
middleware: Middleware
<{}, any
, Dispatch
<AnyAction
>>
inject middleware for Redux
Inherited from
PluginModule.middleware
Defined in
packages/reactant-module/src/core/plugin.ts:27
options
• options: IStorageOptions
Defined in
packages/reactant-storage/src/storage.tsx:94
paused
• paused: boolean
= false
persistence paused
Defined in
packages/reactant-storage/src/storage.tsx:226
persistConfig
• Protected
persistConfig: Record
<string
, PersistConfig
<any
, any
, any
, any
>> = {}
Defined in
packages/reactant-storage/src/storage.tsx:85
persistRootConfig
• Protected
persistRootConfig: Pick
<IStorageOptions
, "version"
| "serialize"
| "timeout"
| "storage"
| "keyPrefix"
| "blacklist"
| "whitelist"
| "transforms"
| "throttle"
| "migrate"
| "stateReconciler"
| "getStoredState"
| "debug"
| "writeFailHandler"
| "loading"
> & { key
: string
}
Defined in
packages/reactant-storage/src/storage.tsx:87
persistor
• Protected
Optional
persistor: Persistor
Defined in
packages/reactant-storage/src/storage.tsx:66
rehydrateCallbackSet
• Protected
rehydrateCallbackSet: Set
<() => void
>
Defined in
packages/reactant-storage/src/storage.tsx:312
rehydrated
• rehydrated: boolean
= false
all modules rehydrated
Defined in
packages/reactant-storage/src/storage.tsx:71
storageSettingMap
• storageSettingMap: Map
<object
, Function
>
Defined in
packages/reactant-storage/src/storage.tsx:96
Accessors
store
• get
store(): undefined
| Store
<any
, AnyAction
>
Returns
undefined
| Store
<any
, AnyAction
>
Defined in
packages/reactant-storage/src/storage.tsx:214
Methods
_enhancePersistor
▸ Private
_enhancePersistor(): void
Returns
void
Defined in
packages/reactant-storage/src/storage.tsx:265
_onRehydrated
▸ Protected
_onRehydrated(): void
Returns
void
Defined in
packages/reactant-storage/src/storage.tsx:314
afterCombineRootReducers
▸ afterCombineRootReducers(rootReducer
): Reducer
<any
, AnyAction
>
Parameters
Name | Type |
---|---|
rootReducer | Reducer <any , AnyAction > |
Returns
Reducer
<any
, AnyAction
>
Overrides
PluginModule.afterCombineRootReducers
Defined in
packages/reactant-storage/src/storage.tsx:204
afterCreateStore
▸ afterCreateStore(store
): Store
<any
, AnyAction
>
Parameters
Name | Type |
---|---|
store | Store <any , AnyAction > |
Returns
Store
<any
, AnyAction
>
Overrides
PluginModule.afterCreateStore
Defined in
packages/reactant-storage/src/storage.tsx:228
beforeCombineRootReducers
▸ beforeCombineRootReducers(reducers
): ReducersMapObject
<any
, Action
<any
>>
Parameters
Name | Type |
---|---|
reducers | ReducersMapObject <any , Action <any >> |
Returns
ReducersMapObject
<any
, Action
<any
>>
Overrides
PluginModule.beforeCombineRootReducers
Defined in
packages/reactant-storage/src/storage.tsx:146
flush
▸ flush(): undefined
| Promise
<any
>
immediately writes all pending state to disk and returns a promise
Returns
undefined
| Promise
<any
>
Defined in
packages/reactant-storage/src/storage.tsx:301
getRehydrated
▸ getRehydrated(target
): undefined
| boolean
get every module rehydrated
Parameters
Name | Type |
---|---|
target | object |
Returns
undefined
| boolean
Defined in
packages/reactant-storage/src/storage.tsx:135
onRehydrated
▸ onRehydrated(callback
): void
callback when rehydrated
Parameters
Name | Type |
---|---|
callback | () => void |
Returns
void
Defined in
packages/reactant-storage/src/storage.tsx:326
pause
▸ pause(): undefined
| void
pauses persistence until persist() is called
Returns
undefined
| void
Defined in
packages/reactant-storage/src/storage.tsx:287
persist
▸ persist(): undefined
| void
resumes persistence
Returns
undefined
| void
Defined in
packages/reactant-storage/src/storage.tsx:294
preloadedStateHandler
▸ Optional
preloadedStateHandler(preloadedState
): Object
preloaded state handler for Redux
Parameters
Name | Type |
---|---|
preloadedState | Object |
Returns
Object
Inherited from
PluginModule.preloadedStateHandler
Defined in
packages/reactant-module/src/core/plugin.ts:20
provider
▸ provider(props
): Element
Parameters
Name | Type |
---|---|
props | Object |
props.children? | ReactNode |
Returns
Element
Overrides
PluginModule.provider
Defined in
packages/reactant-storage/src/storage.tsx:334
purge
▸ purge(): undefined
| Promise
<any
>
purges state from disk and returns a promise
Returns
undefined
| Promise
<any
>
Defined in
packages/reactant-storage/src/storage.tsx:308
setStorage
▸ setStorage<T
>(target
, options
): void
set module to storage persistent
Type parameters
Name | Type |
---|---|
T | extends object |
Parameters
Name | Type |
---|---|
target | T |
options | SetStorageOptions <T > |
Returns
void