Skip to content

Support namespacing action creators #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 43 commits into from
Mar 4, 2017
Merged

Support namespacing action creators #196

merged 43 commits into from
Mar 4, 2017

Conversation

yangmillstheory
Copy link
Contributor

@yangmillstheory yangmillstheory commented Feb 27, 2017

This uses a pretty standard recursive algorithm to allow for namespacing action creators and action types. Closes #159, #195.

CC: @renato, @tugorez

I originally didn't want this code to be in this library, but several people have asked for it, and I don't think it's unreasonable to include it.

@@ -106,16 +99,16 @@ describe('createActions', () => {
});

it('should honor special delimiters in action types', () => {
const { 'p/actionOne': pActionOne, 'q/actionTwo': qActionTwo } = createActions({
const { p: { actionOne }, q: { actionTwo } } = createActions({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This makes this technically a breaking change, so we need a major version bump.

@yangmillstheory yangmillstheory merged commit a4047db into master Mar 4, 2017
@renato
Copy link

renato commented Mar 5, 2017

It's working but I'm getting a nextjs/webpack "compilation" warning:
"export 'defaultNamespace' was not found in './namespaceActions'

namespaceActions.js is really missing the export - but it works anyway.

@yangmillstheory
Copy link
Contributor Author

Can you submit a pull request to fix the issue (and file an issue with steps to reproduce)?

@yangmillstheory
Copy link
Contributor Author

@timche timche deleted the prefixes branch April 18, 2018 09:23
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