docs: clarify subscriptions

This commit is contained in:
Yoshua Wuyts
2016-06-07 13:01:59 +02:00
parent 8066c450be
commit aaddc43d5e
+5 -3
View File
@@ -186,9 +186,11 @@ document.body.appendChild(tree)
## Concepts ## Concepts
`choo` cleanly structures internal data flow, so that all pieces of logic can `choo` cleanly structures internal data flow, so that all pieces of logic can
be combined into a nice, cohesive machine. Internally all logic lives within be combined into a nice, cohesive machine. Internally all logic lives within
`models` that contain several properties. `subscriptions` are read-only streams `models` that contain several properties. `subscriptions` are functions that
of data. `effects` react to changes, perform an `action` and can then post the are called at startup and have `send()` passed in, so they act as read-only
results. `reducers` take data, modify it, and update the internal `state`. sources of data. `effects` react to changes, perform an `action` and can then
post the results. `reducers` take data, modify it, and update the internal
`state`.
Communication of data is done using objects called `actions`. Each `action` has Communication of data is done using objects called `actions`. Each `action` has
any number of properties for data, and a unique `type` that can trigger any number of properties for data, and a unique `type` that can trigger