-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Using react-native-web with ReactDOM.createPortal #1765
Comments
Shouldn't you be using Multiple document roots isn't supported at the moment |
I've been fighting with the same problem so would also be interested in the best way to get in working. Would something like I'm not sure how I'd use |
I've been looking for something like |
Ok, I've managed to get things working by doing
Not sure if that's a valid way to do things but it seems to work. |
Multiple roots should now be supported in 0.18 |
Is your feature request related to a problem? Please describe.
Hi, I'm creating an electron app with multiple windows and we're currently using window.open and then using ReactDOM.createPortal to set the document body.
This works great if you're using straight react, but when we're trying to use react-native it is missing the styles.
This also happens when trying to do the same thing in the browser, so isn't related to electron.
Describe a solution you'd like
As ReactDOM.createPortal creates a section of the dom, a way to set up the page so that react-native-web components render correctly. Alternatively, if this works already, a working example would be great.
Describe alternatives you've considered
Writing it in pure react but that means we can't reuse the components
The text was updated successfully, but these errors were encountered: