You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For context, we are using this package to render shared UI components within an Expo _layout file. In other words, for example, we want our header UI to remain in place, but change the title, when a screen is pushed.
Hi,
For a use case with a deep hierarchy, I wanted to only keep the last element portaled to PortalHost.
So my solution was to create this component:
The only real change is the return line, only keeping the last node added.
return <>{state.length > 0 ? state[state.length - 1].node : null}</>;
Now I can have a default portal that will be overrided by deeper portals.
Maybe it could also be a boolean property on PortalHost like "unique"?
The text was updated successfully, but these errors were encountered: