State Diagram
Define the state diagram through stateDiagram
, describing the different states an object goes through in its lifecycle and the transitions between states, showing how the object changes its state in response to events or conditions being met.
Example
stateDiagram-v2
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
Codeļ¼
```mermaid
stateDiagram-v2
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
```
Last modified: 5 months ago