-
Notifications
You must be signed in to change notification settings - Fork 57
Does react-transform-hmr support pure function components #6
Comments
Not currently. gaearon/react-proxy#12 If you'd like to work on this let me know :-) |
@gaearon : Thanks! I'll look into it and try to evaluate whether I have the time to dig into that. Also wanted to say that everyone on my team really appreciates the work you've done for the community this year. Thanks! You've made all of our jobs easier and more fun. |
Not on his team, but 👍 that |
@gaearon I'd like to work on this. I'm about to start transitioning almost all of our components over to pure components so this would be handy :) |
@gaearon will it be possible with that to hot-reload component when changing getDefaultProps? |
I'm a bit confused—how are default props related to pure function components? @danmartinez101
I have some preliminary work in a branch, give me a few days and I'll try to push something to get started. |
@gaearon dunno :) I just wanted the feature and wanted to ask. When component pure and you change getDefaultProps it is not reloaded :( |
We don't currently support pure components at all. If it works for you, it's probably by accident. This is what this issue is about. 😉 I'm also not sure what |
Sadly HMR isn't supported yet defeating the point... Related: gaearon/react-transform-hmr#6 .
Sadly HMR isn't supported yet defeating the point... Related: gaearon/react-transform-hmr#6 .
Sadly HMR isn't supported yet defeating the point... Related: gaearon/react-transform-hmr#6 .
Just pointing out for interested parties that current development of this feature is happening in gaearon/babel-plugin-react-transform#34 - it's already mostly working it seems. |
into stateful components(eg. ES6 class component). gaearon/react-transform-hmr#6
Please track this in gaearon/babel-plugin-react-transform#57. |
React Hot Loader 3 supports functional components without destroying the state. |
hi @gaearon awesome project, congratulations. though im not developing with react i got inspired to use hmr in a backbone project i've got, im using gulp + rollupify + babelify + hbsfy + browserify + browserify-hmr plugin, now i wanted to see how i could implement a transform to re-render my views or templates, would you know of an easier starting point then react-transform-hmr? |
I'm not having any luck getting components defined as a pure function to hot-reload. The component in question:
I get this error in the console:
Is this scenario supposed to work? Any idea what I'm doing wrong? Let me know if more context is needed.
The text was updated successfully, but these errors were encountered: