-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Stateless components cannot be arrow functions #122
Comments
Ah, very good catch. Should be a quick fix. |
Thanks for the quick fix, if you could publish a patch release right away I would be so happy! 🎉 |
@LinusU yes sorry - meant to publish but I had to step out for a sec. Will publish in ~20 minutes. Cheers! |
By the way, not sure if it helps but I've been publishing alphas here: https://gist.github.com/developit/75e724607fe33de9e63f |
Nice! 🙌 I'm using npm so it might be a bit tedious to include the gist... |
For sure, yup. |
Released as 4.6.1. Thanks! |
Thank you! |
A bug in
isFunctionalComponent
is causing an error to be thrown when passing an arrow function as a stateless component. This is because arrow functions doesn't have a prototype, which is used in this function.Compare these two identity functions:
This is the very simple app that I'm using together with browserify:
Note that I'm not using babel here. This works when using babel because it converts the arrow functions to normal functions.
The text was updated successfully, but these errors were encountered: