Patterns
Finite state model
Represent mutually exclusive workflow phases and define permitted events for each phase.
Formal Syntax & Structure
react syntaxreact
{phase: "details", name: ""}Working Example
Example Snippetreact
if (state.phase === "review") return {...state, phase: "done"};