transition()

A standard tool for creating reactors that behave like state machines. State machines make certain tasks extremely easy to reason about.

transition() is a factory for creating ZeduxMachines.

Definition

(initialState: (State | string)) => ZeduxMachine

initialState - Required - The initial state. Can be a valid State or a string state name.

Usage

import { transition } from 'zedux'

const machine = transition(/* initial state here */)

Notes

Check out the harnessing state machines guide for examples of the power that state machines bring to the table.

Check out the ZeduxMachine api to dig into the usage specifics.

results matching ""

    No results matching ""