Commit d4d5c94
committed
Enable SSR for HelloWorld
1. Turn on prerender: true so component server renders, viewable
the "view page source" for http://localhost:3000/hello_world
2. React on Rails config needs to set for using the same bundle
for client and server rendering.
3. Due to the rails/webpacker importing the HMR: true and inline: true
in v5.1, we need to disable those.
4. We can only run this using the
foreman start -f Procfile.dev
because HMR will not work with SSR until we have a separate bundle for
SSR.1 parent bdfd850 commit d4d5c94
File tree
3 files changed
+5
-3
lines changed- app/views/hello_world
- config
- initializers
3 files changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
0 commit comments