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

Action function in dispatch list has weird syntax if arrow functions are used. #9

Open
shashanktomar opened this issue Jun 20, 2017 · 1 comment

Comments

@shashanktomar
Copy link

The following action works perfectly:

function actionCreator(count: number): ActionType {
 return {
    type: types.ActionType,
    count
 };
}

but if rewritten like this:

const actionCreator = (count: number): ActionType => ({
  type: types.ActionType,
  count
});

it produces junk in the devtools dispatcher list. The action that appears looks like this:
actionCreator({, type:, _types2.default.ActionType, stories, })

@YoruNoHikage
Copy link
Owner

Could you provide a minimal example that includes the typing ? We could re-use this as an example too.
I don't use Flow nor Typescript, so I can't really help without having everything out-of-the-box.

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

No branches or pull requests

2 participants