Reducer

interface Reducer<State, in Action : Any>

A reducer that returns the next state, given the current state and an action to handle.

It is not recommended to implement this interface directly. Use the Reducer() function to create a Reducer.

Properties

Link copied to clipboard
abstract val initialState: State

An initial state.

Functions

Link copied to clipboard
abstract fun reduce(acc: State, action: Action): State

Returns the next state, given the current state and an action to handle.