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

Support functional (stateless) components #18

Open
zalmoxisus opened this issue Dec 16, 2015 · 4 comments
Open

Support functional (stateless) components #18

zalmoxisus opened this issue Dec 16, 2015 · 4 comments

Comments

@zalmoxisus
Copy link
Contributor

Doesn't catch errors for React stateless components.
An example to reproduce.

@gaearon
Copy link
Owner

gaearon commented Dec 16, 2015

Is Babel plugin already supporting functional components?

@zalmoxisus
Copy link
Contributor Author

Not sure whether it supports them completely, but react-transform-hmr has no problems with them, that's why I addressed it here. Better to open the issue there?

@zalmoxisus zalmoxisus changed the title Support stateless components Support functional (stateless) components Dec 17, 2015
@gaearon
Copy link
Owner

gaearon commented Dec 17, 2015

No, react-transform-hmr is completely unaware of them. The issue is with Babel plugin which currently doesn't see them.

@zalmoxisus
Copy link
Contributor Author

I see. Actually, just tried the example, and it works well, only after an error occur in the functional component, it will not be able to hot reload anymore and will fail with Cannot read property 'componentWillUnmount' of null.

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