-
Notifications
You must be signed in to change notification settings - Fork 248
Switch to (stateless) functional components #46
Comments
Not a good idea yet since hot loading is kind of broken with stateless component |
Blocked by gaearon/babel-plugin-react-transform#57 |
The solution is pretty filthy and not reliable imo. Not even sure this will be merged. This comment intrigued mehttps://github.com/gaearon/babel-plugin-react-transform/pull/85#issuecomment-185048429 This makes me start thinking that HMR is not optimal. I will look at http://chromakode.github.io/isolated-core/. |
Interesting. |
Awesome. Let's move everything to redux store. |
Still unsure that we need redux. Most things don't even changes (collections, layouts etc). Only pages data, and redux still not really relevant since we don't do complexe changes, but just add/replace in an object... |
Sorry. I didn't review that PR carefully. So @-gaearon is re-rendering the whole app on each hot reload right ? |
Yeah. But I think if we try this, we should consider http://chromakode.github.io/isolated-core/ |
Isolated core mounts app to an iframe while ReactDOM mounts app to DOM. Not sure what's the best. Anyway, will give a try tmr. |
Meanwhile, nice light example Winwardo/solid-octo-disco@e2f22b2 |
He killed his project again https://medium.com/@dan_abramov/hot-reloading-in-react-1140438583bf#.77dfvm6qh |
React Hot Loader 3 supports functional components without destroying the state. |
@gaearon 👍 👍 best news ever |
webpack-2 branch now use react-hot-loader@3, so we are now able to use stateless component everywhere when possible! |
webpack 2 and react-hot-loader v3 are on master, so contributions are welcome:
|
Closing in favor of #747 |
...instead of classes.
The text was updated successfully, but these errors were encountered: