android-components / mozilla.components.lib.state / Reducer


typealias Reducer<S, A> = (S, A) -> S (source)

Reducers specify how the application’s State changes in response to Actions sent to the Store.

Remember that actions only describe what happened, but don’t describe how the application’s state changes. Reducers will commonly consist of a when statement returning different copies of the State.