-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
explicitly mention that app reloads via full page reloads #802
Conversation
otherwise one might assume it uses webpack hot reloading modules as explained here: https://gist.github.com/gaearon/06bd9e2223556cb0d841#file-naive-js BTW why doesn't CRA feature this kind of reloading? It is sooo much faster and 100% reliable.
It supports hot reloading for CSS, but not for React components. See my answer in gaearon/react-hot-boilerplate#97 (comment).
Trust me as author of hot reloading tools that it’s not 100% reliable 😉 . |
@@ -167,7 +167,7 @@ Some features are currently **not supported**: | |||
* Some experimental syntax extensions (e.g. decorators). | |||
* CSS Modules. | |||
* LESS or Sass. | |||
* Hot reloading of components. | |||
* Hot reloading. Full page reload is triggered when you change a file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not sure what you mean. The list is “Limitations”, that is, features that are not supported. Hot reloading of components is not supported, so it should be on the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wanted to specify the limitation.
What do you mean? I am genuinely curious. I have used hot reloaded modules quite a lot but I did not encounter any issues that exist when using react-hot-loader. It would seem that rerendering the whole app should always work, right? |
If you mean |
@gaearon I just created a vanilla CRA and when I change |
If you don‘t use something like React Hot Loader, you need to call HMR APIs yourself. Create React App won’t call them for you, but if you add the calls explicitly, it should work. Este does this manually: https://github.com/este/este/blob/master/src/browser/main.js#L32-L42. |
See also this guide: http://chrisshepherd.me/posts/adding-hot-module-reloading-to-create-react-app. |
Closing this because the current wording "not supported ... Hot reloading of components" seems reasonably clear. |
otherwise one might assume it uses webpack hot reloading modules as explained here: https://gist.github.com/gaearon/06bd9e2223556cb0d841#file-naive-js
BTW why doesn't CRA feature this kind of reloading? It is sooo much faster and 100% reliable.