-
Notifications
You must be signed in to change notification settings - Fork 331
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
hot-reload doesn't work with nwb/express #287
Comments
👍 + 1, same issue on osx and chrome (not tested elsewhere), terminal and browser both log change events yet nothin on page reloads / changes. Using reload option like This happens in fresh nwb react build using hello world example. |
Can you provide a repro repo so this is easier to test? I use the middleware for hot-reloading development at work with no problems, so a full repo allows me more easily compare a working configuration with a broken one. |
@insin can't provide full repo as it is private, but here is server.js that uses the middleware:
let me know if there are other places you need to examine, will do my best to post snippets here. In general hot reloading appears to work, i.e. browser receives and logs events in console, there are outputs in terminal, yet nothing changes visually on a page until manually refreshed. |
A sample of your client app's entry point and how you write components would be useful too, in that case, as nwb is still using (the now-deprecated) https://github.com/gaearon/react-transform-hmr Keeping a keen eye on facebook/create-react-app#2304 too, as Dan Abramov has the hot reloading bug again 😸 |
Sure, here they are: App.js
PushNotificationIOS.js
|
Here is full test app. Server and client side code. Just run |
Thanks, will have a look |
@Racle - it's not patching the component because you're defining render = () => { I don't think React Transform HMR knows how to deal with this, or isn't looking for this way of defining it, as you don't need to bind It works if you define render like this instead: render() { Something else I noticed based on a console error - you don't need the You also might not need I'm totally stealing that |
@insin as a side note, my components are standard react classes with normal render i.e.
And development is not using
So I am still confused to why any sort of reloading won't work. Again all events seem to be received fine in console, just nothing updates on screen. I wonder if react 16 could be an issue? 🤔 Although I am not using nothing fancy like returning components in array etc. |
This issue is a:
System:
Windows 10 enterprise
Node 6
Installed modules:
Description:
Got basic app structure (created with nwb new react-app), with added server folder in root. Server folder includes index.js. Hot reload doesn't work with every change. ex. adding h2 tag with text doesn't seems to be working (or changing text), but adding Row or Col, it's seems to be changing web page.
server/index.js file changes doesn't register to reload.
Console says next:
And in chrome console
On network tab there is no sign of hot reload.
Nothing happens on localhost:3000, but after restarting node server/index.js, all my changes are there.
index.js
I start server with
node server/server.js
(script in my package.json)The text was updated successfully, but these errors were encountered: