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

(0, _typeof4.default) is not a function #1665

Closed
thekevinbrown opened this issue Aug 16, 2017 · 4 comments
Closed

(0, _typeof4.default) is not a function #1665

thekevinbrown opened this issue Aug 16, 2017 · 4 comments

Comments

@thekevinbrown
Copy link

I'm trying to set up Storybook for our react native application. We're using async / await.

When I run yarn run storybook I get:
screen shot 2017-08-16 at 10 45 50 pm

I think this is related to babel not being configured with "plugins": ["transform-async-to-generator"] so I tried setting that explicitly in a .babelrc in <project>/storybook but it didn't seem to have any effect. I also tried using babel-preset-react-native-stage-0 and it didn't have any effect either.

How can I use async / await with react native storybook? I can't seem to find any examples.

Details:

"@storybook/react-native": "^3.2.4",
"react-native": "0.44.0",
"react-dom": "16.0.0-alpha.6",

The repo I'm working on is open source, so here's a reproduction branch: https://github.com/blargity/kitsu-mobile/tree/storybook

I'd love any help anyone can provide!

@ndelangen
Copy link
Member

I will add the plugin to the babel config

@thekevinbrown
Copy link
Author

Is there a way for me to configure Storybook to use a different babel config in the meantime? I couldn't seem to get it to work even with adding a .babelrc in the storybook directory that running getstorybook created for me.

@ndelangen
Copy link
Member

ndelangen commented Aug 17, 2017

@blargity Thansk for reporting this!

adding a .babelrc in the storybook config folder should work..
If it doesn't that's a new bug/issue.

I've never used this myself, though.


I feel like we need to revamp how we configure things #1209
How nextjs is configured I like a lot.

@ndelangen
Copy link
Member

Regarding this specific issue, please recheck after next release. I think @shilman is working on it at the moment. Please re-open if it's not working.

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

2 participants