Skip to content

Instantly share code, notes, and snippets.

@squeedee
Created November 20, 2015 15:20
Show Gist options
  • Save squeedee/ca2124ea9c7edb19c997 to your computer and use it in GitHub Desktop.
Save squeedee/ca2124ea9c7edb19c997 to your computer and use it in GitHub Desktop.
talking redux-om
[A1] [A2] // reality, its a pubsub
[Sub1] // Action namespace
[sub2] // Store namespace - there are multiple stores
->Action(imm exec)->adds one or more mutations to a stack->[1]
->OtherAction(imm exec)->adds one or more mutations to a stack->[1]
[1]->execute all mutations([r3]immed better)->Dispatch the latest atom changes to the component within one frame
* [r1] All mutations applied in the immediate order they were queried
* [r2] All mutations are applied to the resultant state of the previous mutation
* [r3] If actions do not result in same-frame mutations, closures in action calls could change
f0t0(ec): defer
f0t0(he): timout occurs from defer
-> NextFrameCode.push(timeoutHandlerFn)
f0t0(he): Click on a button
-> NextFrameCode.push(buttonHandlerFn)
f0t0(he): Xhttp returns
-> NextFrameCode.push(asyncHandlerFn)
f1t0(ec):
```
timeoutHandlerFn()
buttonHandlerFn()
asyncHandlerFn()
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment