Skip to content
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

Generate Actions #8

Open
bencompton opened this issue Oct 10, 2016 · 0 comments
Open

Generate Actions #8

bencompton opened this issue Oct 10, 2016 · 0 comments

Comments

@bencompton
Copy link
Owner

It would be useful to support this type of syntax:

class ShoppingCart extends Actions {
    constructor(store) {
        super(store);

        this.generateActions(
            'addToCart',
            'removeFromCart',
        )
    }
}

While this is handy for ES6, it would not work with so well with TypeScript for strongly typing the actions with their reducers. Actions generated in this manner are not strongly typed. Perhaps the generateActions method would simply not be exposed in the typings to ensure it isn't used with TypeScript.

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

No branches or pull requests

1 participant