Embed Remix in a server side application #3347
Unanswered
tomtomdurrant
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Just throwing an idea here: what if you inverted the idea, developed the Remix app as the main app, and considered the header & footer rendered by PHP as data, that you would retrieve from your root loader ? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
We're evaluating Remix as a potential framework for a service we're building at my work. The long and short of it is that we have a PHP application serving a header and a footer and that we would like the Remix app to be the main content that is served in the middle of it. Because the company I work for is in e-commerce they have requested that the app is SEO crawlable and all the good stuff that comes with server rendering a React application. Therefore they didn't like the idea of putting the Remix app in an iFrame and calling it a day.
Initially I thought that we could request the HTML from the corresponding Remix route and then proxy the subsequent requests (chunk.js etc) back to the Remix application. However this seems to duplicate the HTML. E.g. if all you have is a button on the page, when the JS comes back and hydrates the DOM, you'll then end up with 2 buttons. Once from the initial HTML and once from the hydration.
Can anyone think of what might be the best way of doing this? Basically "embedding" a Remix application inside another, totally separate PHP application.
I hope this makes sense and literally any help would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions