Skip to content
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

Support for React Native #9

Open
dylancom opened this issue Mar 11, 2020 · 5 comments
Open

Support for React Native #9

dylancom opened this issue Mar 11, 2020 · 5 comments

Comments

@dylancom
Copy link

I was wondering if it would be possible to use reversed portals in a React Native project.

@pimterry
Copy link
Member

Right now, no, this isn't supported. I'd love to be able to support it, but I'm not sure it's even possible.

At the moment, react-reverse-portals works by rendering into a custom dom node using a normal react portal, and then moving that node around to get the behaviour we want. Moving nodes could be replaced by some specific react native mechanism, maybe, but as far as I can tell react native doesn't support standard portals at all, so that wouldn't be sufficient. I suspect until it does, it's just not practical to support react native here.

Sorry about that. If you do find a way that this could work though, I would love to hear about it!

@dylancom
Copy link
Author

dylancom commented Mar 12, 2020

It seems these guys came really far: https://tech.m6web.fr/6play/how-a-fullscreen-video-mode-ended-up-implementing-react-native-portals/
https://github.com/mfrachet/rn-native-portals
Only not supported anymore for iOS.

@janvorwerk
Copy link

@pimterry with projects such as https://github.com/gorhom/react-native-portal, do you think that your opinion of March 2020 would change?

@pimterry
Copy link
Member

No idea @janvorwerk, I haven't touched react-native myself at all. If you want to try out new approaches, go for it! Do please share any feedback about what works or doesn't here for others too.

@janvorwerk
Copy link

@pimterry thanks for your reply. I wish I was more experienced with both React and React Native, but it's a starting journey for me. Sure if I find something, I'll share it here!

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