Skip to content

Use Reducer

Overview

use_reducer is a ReactPy hook that holds state behind a function: you send an action, and a reducer turns the current state plus that action into the next state.

state, dispatch = use_reducer(reducer,