About
State is the attribute values of a thing at a given moment.
A State can be seen as a snapshot of values at a precise moment.
A entity may have several related primary state stored in a attribute called status that forms together a lifecyle.
Code is easy,
State is hard
Articles Related
Example
- File: if a line was added to a file, the file has a new state
- Variable: if a variable has a new value, the variable has a new state
- A on/off button has two states:
Management
History
Reaction
Tracking the changes to values as your program runs and propagating this change is called reactive programming.
Graph
Automata models computing devices or machines through state transition. See Automata - State