Skip to content

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.


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.

4 participants