-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
[Portal] Missing Docs & General Confusion #2501
Comments
Sorry this is confusing, but Portal is only used in Android right now which hasn't been released yet. Any reason to not just use Modal? |
I've put up D2397933 internally to add a comment to this effect. If you can't do what you want with |
can you elaborate why? is it related to some limitations with iOS? |
Basically because Android didn't have a need for a native version because we weren't doing any hybrid apps yet. The native version that uses on iOS is better because it let's the modal cover the entire screen, whereas in a hybrid native/ReactNative app where the ReactNative view might just be some fraction of the screen (e.g. if you have a native nav bar or header that renders a ReactNative root view), then the RN rootView can't render outside its bounds (i.e. render on top of the nav bar) using pure JS (e.g. , which is why we created a native modal component to get around that. |
Can we please get this documented properly? There is huge demand for something like this for Android https://github.com/brentvatne/react-native-overlay |
I've been trying to figure out how to use
Portal.js
(since there's no official docs, yet)https://github.com/facebook/react-native/blob/master/Libraries/Portal/Portal.js
now although the comment at the top says:
if I don't render
<Portal>
I get:Calling showModal but no Portal has been rendered.
from reading the docs, it sounds like
<Portal>
is being auto-rendered somehow...it is still unclear to me if I should be using
Portal
at all...it doesn't seem to be integrated with
Modal
- which seems to offer a nicer interface...in any case;
after tinkering around for a bit, I got an example working, if anyone's interested:
am I using it correctly?
The text was updated successfully, but these errors were encountered: