React-hot-loader: React hot loader not compatible with electron

Created on 15 Dec 2017  路  11Comments  路  Source: gaearon/react-hot-loader

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

Most helpful comment

Can confirm it's working with electron 1.8.2 beta! 馃憦

All 11 comments

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

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

@okonet - I hope this weekends.

Yes I hope too.

Please let me know as I can help testing it.

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.

Can confirm it's working with electron 1.8.2 beta! 馃憦

@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 ?

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

@neoziro Thanks ! It is working now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

theKashey picture theKashey  路  4Comments

mattkrick picture mattkrick  路  3Comments

theKashey picture theKashey  路  3Comments

zlk89 picture zlk89  路  3Comments

Opty1712 picture Opty1712  路  4Comments