goatslacker / goatslacker/alt

Document the magic that is linking actions to stores

Open
#671 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.4k
Forks
312
PR merge metrics
No merged PRs in 30d

Description

Hi,

I have been looking at the [testing stores example](https://github.com/goatslacker/alt/blob/master/docs/testing/stores.md) and the associated [repository](https://github.com/jdlehman/alt-example-tests). 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!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.