From 00fc804a0349645a04b6f3b4d712c52e6fedcb0d Mon Sep 17 00:00:00 2001 From: Enrique Delgado Date: Thu, 7 Nov 2019 14:26:06 -0600 Subject: [PATCH 1/2] :memo: adds reference to sample repo demonstrating HMR --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 35fa5b6f1..cce987c85 100644 --- a/README.md +++ b/README.md @@ -681,9 +681,9 @@ TheRubyRacer [hasn't updated LibV8](https://github.com/cowboyd/therubyracer/blob LibV8 itself is already [beyond version 7](https://github.com/cowboyd/libv8/releases/tag/v7.3.492.27.1) therefore many serverside issues are caused by old JS engines and fixed by using an up to date one such as [MiniRacer](https://github.com/discourse/mini_racer) or [TheRubyRhino](https://github.com/cowboyd/therubyrhino) on JRuby. ### HMR -HMR is possible with this gem as it does just pass through to Webpacker. Please open an issue to let us know tips and tricks for it to add to the wiki. +HMR is [possible with this gem](https://stackoverflow.com/a/54846330/193785) as it does just pass through to Webpacker. Please open an issue to let us know tips and tricks for it to add to the wiki. -One example: [Stack Overflow answer with Babel and Webpacker config](https://stackoverflow.com/a/54846330/193785) +Sample repo that shows HMR working with `react-rails`: [https://github.com/edelgado/react-rails-hmr](https://github.com/edelgado/react-rails-hmr) ## Related Projects From 57ab44ba3636ab9f9b213724804b6801327ee55a Mon Sep 17 00:00:00 2001 From: Enrique Delgado Date: Thu, 7 Nov 2019 14:34:54 -0600 Subject: [PATCH 2/2] :memo: document SSR and HMR incompatibility. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cce987c85..85749f26d 100644 --- a/README.md +++ b/README.md @@ -681,10 +681,12 @@ TheRubyRacer [hasn't updated LibV8](https://github.com/cowboyd/therubyracer/blob LibV8 itself is already [beyond version 7](https://github.com/cowboyd/libv8/releases/tag/v7.3.492.27.1) therefore many serverside issues are caused by old JS engines and fixed by using an up to date one such as [MiniRacer](https://github.com/discourse/mini_racer) or [TheRubyRhino](https://github.com/cowboyd/therubyrhino) on JRuby. ### HMR -HMR is [possible with this gem](https://stackoverflow.com/a/54846330/193785) as it does just pass through to Webpacker. Please open an issue to let us know tips and tricks for it to add to the wiki. +Hot Module Replacement is [possible with this gem](https://stackoverflow.com/a/54846330/193785) as it does just pass through to Webpacker. Please open an issue to let us know tips and tricks for it to add to the wiki. Sample repo that shows HMR working with `react-rails`: [https://github.com/edelgado/react-rails-hmr](https://github.com/edelgado/react-rails-hmr) +One caveat is that currently you [cannot Server-Side Render along with HMR](https://github.com/reactjs/react-rails/issues/925#issuecomment-415469572). + ## Related Projects - [webpacker-react](https://github.com/renchap/webpacker-react): Integration of React with Rails utilizing Webpack with Hot Module Replacement (HMR).