flummox-isomorphic-demo icon indicating copy to clipboard operation
flummox-isomorphic-demo copied to clipboard

Action creators

Open nickdima opened this issue 9 years ago • 1 comments

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

nickdima avatar Feb 14 '15 21:02 nickdima

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

acdlite avatar Feb 14 '15 21:02 acdlite