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

State is not preserved when hot reloading #328

Closed
tomduncalf opened this issue Aug 2, 2016 · 7 comments
Closed

State is not preserved when hot reloading #328

tomduncalf opened this issue Aug 2, 2016 · 7 comments

Comments

@tomduncalf
Copy link

I would expect the app state to be preserved when hot reloading occurs, but this doesn't seem to be the case – the state always resets to the initial state.

Simple reproduction test case: https://github.com/tomduncalf/create-react-app-state-hmr-bug

@tomduncalf
Copy link
Author

Sorry, just seen #93 – does this mean React HMR is not enabled yet? Will close this issue if so

@gaearon
Copy link
Contributor

gaearon commented Aug 2, 2016

Yea, no plans to enable it until it’s more stable. (Requires work both on Webpack and my side, and I didn’t have time for this yet.)

@gaearon gaearon closed this as completed Aug 2, 2016
@tomduncalf
Copy link
Author

Cool, thanks Dan. Great work on this, makes a big difference to the mental overhead of trying out a new idea or whatever...

@gaearon
Copy link
Contributor

gaearon commented Aug 2, 2016

Thanks!

@tomduncalf
Copy link
Author

Would you consider a PR to add this as an experimental feature or do you want to avoid things like that? Unfortunately no HMR means this isn't that practical for me to use on my current project, as the state is annoying to set up every time :(

@gaearon
Copy link
Contributor

gaearon commented Aug 2, 2016

No, PR won’t help because, as I said, the underlying tools are not stable enough to be the default.

@tomduncalf
Copy link
Author

Thought so – will keep an eye on the tool and hopefully at some point HMR
can become stable enough to be supported officially :)

On 2 August 2016 at 19:40, Dan Abramov notifications@github.com wrote:

No, PR won’t help because, as I said, the underlying tools are not stable
enough to be the default.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#328 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFNIlhTxtLviLveCSnsDm6sPQA5jgjK8ks5qb48cgaJpZM4Japt_
.

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

No branches or pull requests

2 participants