Create React App integrated in an existing application
See original GitHub issueIf I have a react app nested in a server-side rendered page, how would I be able to get react to live-reload while in dev?
Right now, the server renders the page which has a DOM element the CRA app mounts to, to display within the application. It works great since we can’t stop to rewrite the entire application just yet, but we can’t get it to live-reload this way.
Basically my structure is
/app (server)
/public (css/js)
/ui (cra)
/views (server-side)
ui
is all the react code, and it gets transpiled and pushed to the /public
directory, where it then looks for div ids in /views
to mount to. The server generates the page, loads the JS, and React starts running inside the rendered pages, wherever it mounts.
How can I run this app and have react hot-reload to /public for me?
Thanks!
Also, this would be nice to do without ejecting.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7
Top GitHub Comments
nope. still don’t have true live-reload, but i figure it’s still a better dev workflow than having to rebuild every time you want to see a change
Interesting. That works pretty well but doesn’t live-reload the component, just updates the JS. Do you have a way to do that?
On Fri, Mar 23, 2018 at 9:54 PM, qwertwerty21 notifications@github.com wrote:
–
Nathan Hyland (602)740-5705