ReduxAdapter
Defined in: index.ts:22
Redux adapter. @reduxjs/toolkit is a peer dependency and is statically
imported — so construction is synchronous and SSR-friendly. The async
helpers below stay for back-compat with consumers that already wrote
await createReduxStore(...); they resolve immediately.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
TState | any |
Implements
Section titled “Implements”Store<TState>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ReduxAdapter<
TState>(initialState):ReduxAdapter<TState>
Defined in: index.ts:27
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
initialState | TState |
Returns
Section titled “Returns”ReduxAdapter<TState>
Methods
Section titled “Methods”dispatch()
Section titled “dispatch()”dispatch(
action):void
Defined in: index.ts:61
Dispatch an action to update state
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
action | Action |
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Store.dispatch
getState()
Section titled “getState()”getState():
TState
Defined in: index.ts:53
Get the current state
Returns
Section titled “Returns”TState
Implementation of
Section titled “Implementation of”Store.getState
subscribe()
Section titled “subscribe()”subscribe(
listener): () =>void
Defined in: index.ts:57
Subscribe to state changes Returns an unsubscribe function
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
listener | (state) => void |
Returns
Section titled “Returns”() => void
Implementation of
Section titled “Implementation of”Store.subscribe