liveBook · Manning

State transition

Also called state changes

A state transition is a change from one defined state of a system, object, or process to another according to an action, event, condition, or rule.

How 12 Manning books explain it

Object-Oriented Software Design in C++

A state transition is a change from one object state to another caused by a change in member-variable values.

How it is used
Uses state transitions to visualize runtime behavior and organize actions that depend on an object’s current state.
How deep it goes
Explains member-variable changes, UML notation, guarded paths, terminal states, and polymorphic next-state handling.
Examples
Uses Car behavior, student enrollment, and a ticket machine with card validation, ticket counts, and a SOLD_OUT state.
What you can do after
Evaluate/understand runtime state changes and design a state-based class using UML diagrams or separate State subclasses.

Read how Object-Oriented Software Design in C++ explains state transition →

Functional Programming in C#, Second Edition

A state transition is a change from an entity's current state to a resulting state.

How it is used
Models how an entity changes while retaining its identity, using transitions instead of mutating state snapshots.
How deep it goes
Works through transition functions, account creation, event matching, and an exception fallback for unhandled events.
Examples
Uses account creation, cash deposits, transfers, and account freezing to illustrate different transitions.
What you can do after
Build it from scratch by implementing functions that create account state and apply events to produce updated snapshots.

Read how Functional Programming in C#, Second Edition explains state transition →

Type-Driven Development with Idris

A state transition is a change from one state of a system to another as a result of an operation.

How it is used
Uses state transitions to express valid operation sequences in state-machine command types.
How deep it goes
Works through indexed command types and precondition checks, while leaving execution of the door and vending-machine models unimplemented.
Examples
Uses a door and a vending machine, including coin insertion, vending, and returning coins.
What you can do after
Build state-machine command models from scratch in Idris and check that operation sequences satisfy their modeled preconditions.

Read how Type-Driven Development with Idris explains state transition →

Applied Reinforcement Learning

A state transition is a change from one environment state to another resulting from an action and possibly random effects.

How it is used
Models how a system moves between states during sequential decisions under uncertainty.
How deep it goes
Distinguishes deterministic evolution from stochastic transitions with known probabilities and applies transitions in business examples.
Examples
Uses customer plan changes, online-store pricing, and call-center staffing to illustrate system evolution.
What you can do after
Evaluate how business actions affect next states and identify missing information that weakens prediction.

Read how Applied Reinforcement Learning explains state transition →

Software Design for Python Programmers

A state transition is a change from one object state to another caused by changes in one or more attributes.

How it is used
Models runtime behavior whose allowed actions and responses depend on an object's current state.
How deep it goes
Defines transitions and traces multiple conditional paths, while deferring implementation details of the State Design Pattern.
Examples
Uses an automatic ticket machine with card insertion, validation, ticket collection, card removal, rejection, and sold-out paths.
What you can do after
Evaluate object behavior by identifying states, attribute changes, triggering actions, conditions, and reachable transitions.

Read how Software Design for Python Programmers explains state transition →

React in Depth

A state transition is a state machine operation that changes the machine from one state to another in response to an event or condition.

How it is used
Models constrained application flow while coordinating data updates triggered by events.
How deep it goes
Defines legal events, targets, actions, context, selectors, and hooks, but does not develop formal state-machine theory.
Examples
Uses signup navigation and a list/detail application with add, view, complete, undo, remove, and persistence operations.
What you can do after
Apply it via XState by defining legal transitions, attaching context actions, and exposing machine state through React hooks.

Read how React in Depth explains state transition →

Functional Programming in Scala, Second Edition

A state action is a function that consumes an RNG state and returns a generated value together with a successor RNG state.

How it is used
Represents random computation as composable functions that thread RNG state without explicit repetitive passing.
How deep it goes
Defines the function representation and develops map, map2, sequence, flatMap, and imperative-style composition.
Examples
Uses nonNegativeEven, paired integer-double actions, list sequencing, and a candy-machine simulation.
What you can do after
Build state actions from scratch and combine them with map, map2, sequence, flatMap, and for-comprehensions.

Read how Functional Programming in Scala, Second Edition explains state transition →

The Art of Unit Testing 3e

A state change is a modification to data or module state that can be observed by code outside the operation causing it.

How it is used
Treats an externally observable state change as an exit point for defining and testing a unit of work.
How deep it goes
Defines state change as a publicly noticeable exit point and demonstrates checking a UI change, without detailing state-management internals.
Examples
Demonstrates a JavaScript button click changing a result element’s text, then checks the element’s visible content.
What you can do after
Evaluate unit behavior by checking an observable state change rather than private implementation logic.

Read how The Art of Unit Testing 3e explains state transition →

Natural Language Processing in Action, Second Edition

A state transition is a change from one conversational state to another in response to an input or condition.

How it is used
Routes chatbot inputs through conversation graphs to select the next conversational state.
How deep it goes
Explains intents as graph edges and demonstrates YAML trigger routing, without detailing the underlying decision algorithm.
Examples
Uses an elementary counting tutor with correct-answer and wrong-answer routes for alternative user responses.
What you can do after
Build a conversation graph that maps anticipated user replies to target chatbot states.

Read how Natural Language Processing in Action, Second Edition explains state transition →

API Design Patterns

A state transition is a change of a resource from one status or condition to another.

How it is used
Guides API designers in deciding when a resource state change deserves a custom action instead of a standard update.
How deep it goes
Explains the conceptual distinction from scalar updates and identifies confusion and side effects, but stops short of implementing a custom action.
Examples
Uses an email moving from draft to sent, with UpdateEmail setting state to sent as the problematic design.
What you can do after
Apply custom actions to represent meaningful state changes rather than disguising them as ordinary field updates.

Read how API Design Patterns explains state transition →

Healthcare IT

A state transition is a change of an object or process from one defined state to another according to permitted transition rules.

How it is used
Models clinical orders and workflows as controlled progressions that coordinate responsibilities, data capture, and downstream actions.
How deep it goes
Traces permitted order states, actors, timestamps, data, and interacting workflow effects, but does not specify implementation code.
Examples
Uses a CBC order moving through signing, activation, specimen collection, processing, and result finalization.
What you can do after
Build clinical workflow logic that rejects invalid steps, records timestamped responsibility, and reacts to related events.

Read how Healthcare IT explains state transition →

Build and Orchestrator in Go (From Scratch)

A state transition is a change of a task from one lifecycle state to another in response to an event.

How it is used
Constrains task lifecycle changes during orchestration by allowing only event-driven transitions defined for each current state.
How deep it goes
Defines states, tabulates valid moves, and implements map-based validation while deferring a full state-machine abstraction.
Examples
Uses Pending, Scheduled, Running, Completed, and Failed states with ScheduleEvent, StartTask, and StopTask transitions.
What you can do after
Build it from scratch with a state map and helper that reject destinations not listed for the current state.

Read how Build and Orchestrator in Go (From Scratch) explains state transition →

Also covered in

What to know first

Related concepts

Questions about state transition

What is state transition?

A state transition is a change from one defined state of a system, object, or process to another according to an action, event, condition, or rule.

Which Manning books explain state transition?

Object-Oriented Software Design in C++, Functional Programming in C#, Second Edition, Type-Driven Development with Idris, Applied Reinforcement Learning, Software Design for Python Programmers, React in Depth, Functional Programming in Scala, Second Edition, The Art of Unit Testing 3e and 4 more.

What should I know before learning state transition?

Manning books that teach state transition usually introduce state, pattern matching, data model and data exploration first.

What kinds of state transition are there?

Kinds of state transition include stateful computation.

What is state transition part of?

State transition is part of finite-state machine. A finite-state machine is a computational model with a finite set of states and defined transitions between them, typically determined by inputs or events.

What is state transition also called?

State transition is also called state changes.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.