
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
react-native-portalize
Advanced tools
The simplest way to render anything on top of the rest.
This component is extracted from react-native-paper
and has been simplified for the purpose of react-native-modalize
.
yarn add react-native-portalize
import React from 'react';
import { View, Text } from 'react-native';
import { Host, Portal } from 'react-native-portalize';
export const MyApp = () => (
<Host>
<View>
<Text>Some copy here and there...</Text>
<Portal>
<Text>A portal on top of the rest</Text>
</Portal>
</View>
</Host>
);
Example with react-native-modalize
and react-navigation
import React from 'react';
import { View, TouchableOpacity, Text } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { Modalize } from 'react-native-modalize';
import { Host, Portal } from 'react-native-portalize';
const Tab = createBottomTabNavigator();
const ExamplesScreen = () => {
const modalRef = useRef<Modalize>(null);
const onOpen = () => {
modalRef.current?.open();
};
return (
<>
<TouchableOpacity onPress={onOpen}>
<Text>Open the modal</Text>
</TouchableOpacity>
<Portal>
<Modalize ref={modalRef}>...your content</Modalize>
</Portal>
</>
);
};
const SettingsScreen = () => (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Settings screen</Text>
</View>
);
export const App = () => (
<NavigationContainer>
<Host>
<Tab.Navigator>
<Tab.Screen name="Examples" component={ExamplesScreen} />
<Tab.Screen name="Settings" component={SettingsScreen} />
</Tab.Navigator>
</Host>
</NavigationContainer>
);
children
A React node that will be most likely wrapping your whole app.
Type | Required |
---|---|
node | Yes |
style
Optional props to define the style of the Host component.
Type | Required |
---|---|
style | No |
children
The React node you want to display on top of the rest.
Type | Required |
---|---|
node | Yes |
FAQs
Render anything on top of the rest
The npm package react-native-portalize receives a total of 32,549 weekly downloads. As such, react-native-portalize popularity was classified as popular.
We found that react-native-portalize demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.