Document the magic that is linking actions to stores
noahmonster opened this issue · 1 comments
Hi,
I have been looking at the testing stores example and the associated repository. Conceptually, I think these are very good examples.
I ran into a bit of an issue when I then tried to use this documentation to test my own stores. I was trying to dispatch an event using:
alt.dispatcher.dispatch({action: MyActions.someAction, data: {} });
This wasn't working.
I eventually discovered that I instead need to pass "action: MyActions.SOME_ACTION" instead of "MyActions.someAction" and everything started working.
I'd like to request that these special keys (MyActions.SOME_ACTION
) that point to action functions be made more clear in the documentation. It would have saved me a lot of time if this was explained in the testing stores example. It would also be nice to have this explained in the Actions class documentation.
Thanks!