flummox-isomorphic-demo
flummox-isomorphic-demo copied to clipboard
Action creators
Can you add an example of dispatching an action from a component? An usual user interaction, like clicking on a button or something. I didn't quite get it how you do that with flummox
Yes, I need to work on some better examples. Just haven't found time yet.
Actions are just functions. You can access them with Flux#getActions(key)
. There's an example of an action being used here — not as a result of a button click, but it's the same concept: https://github.com/acdlite/flummox-isomorphic-demo/blob/master/src/shared/components/StargazerGridHandler.js#L16-L18