-
Notifications
You must be signed in to change notification settings - Fork 300
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
Deprecation warnings and HMR #37
Comments
can you please tell us what mode you are running the server in? When running/testing SSR Caching one Gotcha is that it will only work in PRODUCTION mode.
|
@ananavati thank you for the response. Yes, in production mode it works. I'm novice in Electrode so I have some questions. 🙂 |
this question about electrode supporting HMR has come up in multiple places electrodejs#33 electrode-io/electrode#37
thanks for checking out Electrode and hope you are enjoying it! Multiple questions being asked in this thread and hope these answers provide more clarity on your questions. Question 1: There are no images loaded in the demo app in production mode because of a mismatch between the path images being served (/js/image.svg) at and path they are being looked for (/image.svg). Electrode-Boilerplate already supports loading of isomorphic images, refer:
Question 2: And what about not working HMR? hot-reloading of jsx is already built in electrode. please refer to the README here: https://github.com/electrode-io/electrode-archetype-react-app#what-is-hot-mode
Question 3: App is structured by type, but this is not the best practice. Do you plan change the structure to best practice (by feature)? Could you please elaborate on this question? Perhaps an example or a working POC/pr might help answer this question better. Question 4: And is there any plan to get rid of Gulp in favour npm scripts with webpack which is the best practice today? Initial versions of Electrode archetypes were certainly using npm scripts but we started running into a few problems and here are some of the brief benefits we feel will help make it easy and simple for developers: Benefits
gulp scripts can still be wrapped in npm scripts here is an example of using using npm scripts to execute JS tasks in the archetype: https://github.com/electrode-io/electrode-boilerplate-universal-react-node/blob/master/package.json#L21-L24 |
Answer 1: Electrode-Boilerplate already supports loading of isomorphic images Answer 2: hot-reloading of jsx is already built in electrode Answer 3: Could you please elaborate on this question? I saw this question was raised several times on hackernews in the comments, why electrode app is structured this way, not by feature. |
add an explicit note about hot module reloading in gulp hot README
@ananavati @osenvosem I started using electrode and I'm getting the same problem with the hot reloader, every time that i made a change the app is fully reloaded and I'm losing the app state. any suggestion on how to fix it? is there any specific config that I can use? thank you |
Just to confirm that I've also had this problem since I started using electrode; on top of it, if the changes are saved fast enough (and more often than not they are, because the IDE auto saves) when the it restarts the server, it restarts too fast, and I find a "server not running" message on the browser. |
I am not so sure why hot reloader is so exciting. I am using Vim for my development. Not like any IDE, you can let the editor there without saving, I need to save in Vim and then moving to the other file and every time I edit a file, the whole server gonna refresh, even I haven't finished my coding yet. It is even worse because I have the habit of pressing save multiple times. If i Can we have something like |
@bubuzzz : You should be able to avoid this problem by running |
close since a new issue on HMR is opened #125, which has some more details. |
add ccm initializer
this question about electrode supporting HMR has come up in multiple places electrodejs/deprecated-electrode-archetype-react-app#33 electrode-io/electrode#37
macOS 10.12.1 node 7.0.0
And when I head to
/ssrcachingtemplatetype
I see an empty page and the warning appear:Also HMR doesn't work, WDS simply reloads a page.
The text was updated successfully, but these errors were encountered: