Do the portals preserve React context? #310
raffidahmad
started this conversation in
General
Replies: 2 comments 1 reply
-
|
We use a JS-based portal that breaks external React context by design. We manually bridge our own internal contexts, but users' custom contexts only work if their providers wrap the PortalHost. This is the same limitation Tamagui is highlighting. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
did you look into something like https://github.com/kirillzyusko/react-native-teleport |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
From https://tamagui.dev/ui/native
Native portals preserve React context - the default implementation on native uses a JS-based approach that breaks React context, or requires you to hoist data awkwardly. With native portals, your custom contexts (navigation, app state) work inside Sheet, Dialog, Popover, and other portaled content.
Whats the case here?
Beta Was this translation helpful? Give feedback.
All reactions