8000 React Native app as host · Issue #564 · Shopify/remote-dom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

React Native app as host 8000 #564

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

Closed
mateuszmazurek opened this issue Apr 22, 2025 · 3 comments
Closed

React Native app as host #564

mateuszmazurek opened this issue Apr 22, 2025 · 3 comments

Comments

@mateuszmazurek
Copy link

My "host" application is built using React Native. I'm trying to understand whether I should be utilizing remote-ui or the newly introduced remote-dom in this context. If remote-dom is the recommended approach, I assume I would need to incorporate the DOM polyfill. Could you elaborate on the advantages of using this new approach with remote-dom compared to the previous architecture of remote-ui, especially within a React Native environment? Furthermore, I'm curious if Shopify's own mobile applications have already migrated to using remote-dom, or if they are still relying on remote-ui for their remote rendering needs. Any insights into Shopify's internal adoption strategy would be greatly appreciated.

(I originally posted this in this discussion, but since I haven’t received a response, I thought it might be better to open an issue instead)

@thinesjs
Copy link
thinesjs commented May 11, 2025

@mateuszmazurek Having similar doubts, have you come up to any conclusion on this matter, to using remote-dom or remote-ui?

@lemonmade
Copy link
Member

Hey @mateuszmazurek and @thinesjs, my apologies for the delay. This is a great question! The most important thing to decide first is what experience you want the builder of the "remote" applications to have. Are you comfortable with them only being able to use the "vanilla JavaScript" API for remote-ui, or its custom React reconciler? If so, remote-ui is still an option for you, and it does avoid some bundle size in the "remote" environment, since 8000 a DOM polyfill is not needed.

That said, I think most folks will be better off moving to Remote DOM instead. Its "vanilla" API is more familiar to developers (since it's just the DOM), and its React version does not depend on a custom reconciler. The remote-ui React reconciler was difficult to maintain, and I believe still has issues with React 19; by contrast, when using Remote DOM, you can use the official react-dom renderer instead. On top of that, Remote DOM lets the remote applications use other DOM-friendly libraries in place of React, which was simply not an option with remote-ui.

Shopify is moving its UI extension system towards Remote DOM, including on native starting with UI extensions in Shopify Mobile. Aside from a slightly larger sandbox to load extensions into, there isn't much difference for the client app — both remote-ui and Remote DOM have React bindings that should work for you in React Native.

@mateuszmazurek
Copy link
Author

@lemonmade Do you have a simple example, template, or boilerplate showing how to use Remote DOM in a React Native host (client) app — ideally also with node.js as a remote? It feels a bit complicated to me (though it probably isn’t), and I always learn best by analyzing existing code. That would be really helpful! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0