Skip to content

Conversation

@nixpulvis
Copy link
Contributor

I'm just starting to look at this library, but reading the README this stood out.

README.md Outdated

```js
const increment = createAction('INCREMENT');
const NOOP = createAction('NOOP');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we follow the previous casing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL I suck at programming.

@yangmillstheory
Copy link
Contributor

Thanks. This was likely copy-pasta.

@yangmillstheory yangmillstheory merged commit 06aeb21 into redux-utilities:master Jun 9, 2017

```js
let increment = createAction('INCREMENT', amount => amount);
let noop = createAction('NOOP', amount => amount);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is noop more suitable than increment for the action creator name? as the action created from this action creator is used to increment a counter?

// As object key in handleActions:
const reducer = handleActions({
[increment]: (state, action) => ({
[noop]: (state, action) => ({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this not be the action creator name (i.e. 'INCREMENT' or a const) rather than the action creator function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants