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

React hot loader not compatible with electron #720

Closed
rllola opened this issue Dec 15, 2017 · 11 comments
Closed

React hot loader not compatible with electron #720

rllola opened this issue Dec 15, 2017 · 11 comments

Comments

@rllola
Copy link

rllola commented Dec 15, 2017

If you are reporting a bug or having an issue setting up React Hot Loader, please fill in below. For feature requests, feel free to remove this template entirely.

Description

When using react hot loader in electron, the instanceof seems to be broken. At least when reloading the result is difference that when running it for the first time.

Expected behavior

I would expect instanceof to have the same result after reloading.

Actual behavior

After reloading the instanceof operator return a different answer than the first time.

Environment

React Hot Loader version:
3.1.3
Run these commands in the project folder and fill in their results:

  1. node -v: 7.10.1
  2. npm -v: 5.4.2

Then, specify:

  1. Operating system: Linux
  2. Browser and version: Electron

Reproducible Demo

https://github.com/rllola/hmr-example-issue

@gregberge
Copy link
Collaborator

The v4 will be based on a new proxy system. As soon as we will release a beta, we should test it on Electron.

@okonet
Copy link

okonet commented Dec 21, 2017

@neoziro any ETA? Can the master branch be tested?

@theKashey
Copy link
Collaborator

@okonet - I hope this weekends.

@gregberge
Copy link
Collaborator

Yes I hope too.

@okonet
Copy link

okonet commented Dec 23, 2017

Please let me know as I can help testing it.

@gregberge
Copy link
Collaborator

Ready 😊 https://github.com/gaearon/react-hot-loader/tree/next

@gregberge
Copy link
Collaborator

I tested it and it does not change the result. But I think it is related to your setup. It looks like code in index.html and in scripts are into two different universes.

I tried to pass React into props and then compare it to import React from 'react' in app.js and it does not work.

So this issue is probably not related to React Hot Loader, and maybe even not related to Hot Module Reloading.

@okonet
Copy link

okonet commented Dec 26, 2017

Can confirm it's working with electron 1.8.2 beta! 👏

@rllola
Copy link
Author

rllola commented Jan 2, 2018

@okonet I still have the issue. Could you tell me what you used to test it ?

Could you tell me if it is working also for you with this setup : https://github.com/rllola/hmr-example-issue ?

@gregberge
Copy link
Collaborator

@rllola your application is not wrapped with hot. Please follow every steps of Getting Started.

@rllola
Copy link
Author

rllola commented Jan 4, 2018

@neoziro Thanks ! It is working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants