Closed marcelklehr closed 8 years ago
Template for action types: category component/[object.]action
e.g. trigger:submission chat/message.send
categories of actions:
trigger
-- user does something
trigger:response
trigger:submission
trigger:abort
evoke
-- app does something
evoke:prompt
evoke:progress
evoke:failure
evoke:success
When the user clicks on something, this will emit a trigger
action. Sagas listen for triggers and emit effects, among which are evoke
actions. These can in turn be listened on by other sagas, but, since reducers will typically only act on evocations, they usually produce a change in the UIs.
Saga code should have as little to do with actions as possible. Actions should only be used to update state or signal events, not for invocations. Instead of put
ting failures, throw an error!
settings/setForUser
instead ofSETTINGS_SET_FOR_USER
)