createStore initial state

This commit is contained in:
Yanick Champoux 2023-05-04 13:16:49 -04:00
parent a04ebfcdfe
commit 2e78e27bf6

View File

@ -198,10 +198,10 @@ export default class Updux<
createStore( createStore(
options: Partial<{ options: Partial<{
initialState: T_LocalState; preloadedState: T_LocalState;
}> = {}, }> = {},
) { ) {
const preloadedState: any = options.initialState ?? this.initialState; const preloadedState: any = options.preloadedState;
const effects = buildEffectsMiddleware( const effects = buildEffectsMiddleware(
this.effects, this.effects,