-
Notifications
You must be signed in to change notification settings - Fork 297
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
Conversation
@@ -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({ |
There was a problem hiding this comment.
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.
It's working but I'm getting a nextjs/webpack "compilation" warning: namespaceActions.js is really missing the export - but it works anyway. |
Can you submit a pull request to fix the issue (and file an issue with steps to reproduce)? |
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.