Store
constructor(reducer: Reducer<S, A>, initialState: S, coroutineDispatcher: CoroutineDispatcher = Dispatchers.Default, coroutineScopeName: String = DEFAULT_COROUTINE_SCOPE_NAME, effectIdSource: EffectIdSource = UUIDEffectIdSource(), logger: Logger = NoopLogger(), exceptionHandler: ExceptionHandler = ThrowingExceptionHandler, parentJob: Job? = null)
Parameters
initialState
The initial state of the Store.
coroutineDispatcher
The CoroutineDispatcher all operations run on. Reducer, effects, and internal operations run on this dispatcher. Default value is Dispatchers.Default.
coroutineScopeName
The name for the CoroutineScope the Store uses. Useful for debugging. The default is DEFAULT_COROUTINE_SCOPE_NAME.
logger
A logger that logs received actions and state updates. Useful for debugging. The default is NoopLogger.
exceptionHandler
The ExceptionHandler that is installed in the CoroutineScope of the Store. All uncaught exceptions occurring in the reducer and effects are passed to this handler. The default is ThrowingExceptionHandler which rethrows all received exceptions.