Skip to content

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 ParameterDefault type
TStateany
  • Store<TState>

new ReduxAdapter<TState>(initialState): ReduxAdapter<TState>

Defined in: index.ts:27

ParameterType
initialStateTState

ReduxAdapter<TState>

dispatch(action): void

Defined in: index.ts:61

Dispatch an action to update state

ParameterType
actionAction

void

Store.dispatch


getState(): TState

Defined in: index.ts:53

Get the current state

TState

Store.getState


subscribe(listener): () => void

Defined in: index.ts:57

Subscribe to state changes Returns an unsubscribe function

ParameterType
listener(state) => void

() => void

Store.subscribe