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

explicitly mention that app reloads via full page reloads #802

Closed
wants to merge 2 commits into from

Conversation

capaj
Copy link

@capaj capaj commented Sep 30, 2016

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.

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.
@gaearon
Copy link
Contributor

gaearon commented Sep 30, 2016

BTW why doesn't CRA feature this kind of reloading?

It supports hot reloading for CSS, but not for React components. See my answer in gaearon/react-hot-boilerplate#97 (comment).

It is sooo much faster and 100% reliable.

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.
Copy link
Contributor

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.

Copy link
Author

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.

@gaearon gaearon added the docs label Sep 30, 2016
@capaj
Copy link
Author

capaj commented Sep 30, 2016

Trust me as author of hot reloading tools that it’s not 100% reliable 😉 .

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?
From what I heard from others, they share similar experience, for example @steida -he has the same hot reloading in https://github.com/este/este

@gaearon
Copy link
Contributor

gaearon commented Sep 30, 2016

It would seem that rerendering the whole app should always work, right?

If you mean module.hot.accept in the root, yes, it works. But it also works now in CRA 😉 . Did you have any issues with it?

@capaj
Copy link
Author

capaj commented Sep 30, 2016

@gaearon I just created a vanilla CRA and when I change app.js it reloads the whole page. So if I understand correctly CRA should just rerender my react app? Then I should probably file a bug.

@gaearon
Copy link
Contributor

gaearon commented Sep 30, 2016

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.

@gaearon
Copy link
Contributor

gaearon commented Sep 30, 2016

See also this guide: http://chrisshepherd.me/posts/adding-hot-module-reloading-to-create-react-app.

@fson
Copy link
Contributor

fson commented Oct 23, 2016

Closing this because the current wording "not supported ... Hot reloading of components" seems reasonably clear.

@fson fson closed this Oct 23, 2016
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants