aboutsummaryrefslogtreecommitdiff
path: root/pages/guide
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2024-03-16 23:41:38 +0000
committerHayleigh Thompson <me@hayleigh.dev>2024-03-17 17:12:10 +0000
commit4aeb451d32d7ad94a5a4111543584a1430cd4571 (patch)
treef64480f138db3fca9a4e9bb97e2fcdb883aa4241 /pages/guide
parent3de8e6e7782b21da3d4efa2e9592634307980d22 (diff)
downloadlustre-4aeb451d32d7ad94a5a4111543584a1430cd4571.tar.gz
lustre-4aeb451d32d7ad94a5a4111543584a1430cd4571.zip
:recycle: Rename '--include-styles' flag to '--use-lustre-ui' for clarity.
Diffstat (limited to 'pages/guide')
-rw-r--r--pages/guide/02-state-management.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/pages/guide/02-state-management.md b/pages/guide/02-state-management.md
index e525f5f..2c9b641 100644
--- a/pages/guide/02-state-management.md
+++ b/pages/guide/02-state-management.md
@@ -18,6 +18,34 @@ The MVU architecture is an example of _unidirectional data flow_:
- The UI re-renders based on the new state.
+```text
+ +--------+
+ | |
+ | update |
+ | |
+ +--------+
+ ^ |
+ | |
+ Msg | | Model
+ | |
+ | v
++------+ +------------------------+
+| | Model | |
+| init |------------------------>| Lustre Runtime |
+| | | |
++------+ +------------------------+
+ ^ |
+ | |
+ Msg | | Model
+ | |
+ | v
+ +--------+
+ | |
+ | view |
+ | |
+ +--------+
+```
+
This is in contrast to _bidirectional_ approaches to state management, where the
UI can modify state directly. For some developers this can be a difficult idea
to get used to, but it brings a number of benefits: