liveBook · Manning

Context object

A context object is a structured value that carries information or state for access by components or operations within a defined scope.

How 2 Manning books explain it

React in Depth

Machine context is the state-machine data container that holds information shared across the overall flow and manipulated during transitions.

How it is used
Uses shared contextual data to coordinate business state across a state-machine flow and its transitions.
How deep it goes
Explains flow-wide storage, transition actions, selectors, and persistence, while stopping short of general state-machine internals.
Examples
Demonstrates lists, current selections, item actions, selector hooks, and persisted XState machine state.
What you can do after
Build it from scratch with XState context, assign actions, React providers, selector hooks, and event-sending hooks.

Read how React in Depth explains context object →

Pro Angular 16

A context object is an object whose properties provide values available to bindings in an instantiated Angular template.

How it is used
Supplies reusable Angular templates and structural directives with values consumed by their bindings.
How deep it goes
Explains property mapping, $implicit values, and iteration metadata through working template and directive examples.
Examples
Uses reusable Header and Footer headings plus a product iterator with implicit items, indexes, and striped rows.
What you can do after
Build reusable templates and custom structural directives that render data-dependent content through named and implicit values.

Read how Pro Angular 16 explains context object →

Also covered in

Related concepts

Questions about context object

What is context object?

A context object is a structured value that carries information or state for access by components or operations within a defined scope.

Which Manning books explain context object?

React in Depth and Pro Angular 16.

What are the parts of context object?

Context object includes attribute.

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.