react-native-safe-area-context#initialWindowMetrics TypeScript Examples
The following examples show how to use
react-native-safe-area-context#initialWindowMetrics.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: App.tsx From react-native-jigsaw with MIT License | 6 votes |
export default function App() {
const [loaded] = Font.useFonts(customFonts);
if (!loaded) {
return <AppLoading />;
}
return (
<Provider theme={DefaultTheme}>
<SafeAreaProvider initialMetrics={initialWindowMetrics}>
<Examples />
</SafeAreaProvider>
</Provider>
);
}
Example #2
Source File: app.tsx From react-native-paper-toast with MIT License | 6 votes |
export default function App() {
const [isLoading, setIsLoading] = useState(true);
useEffect(() => {
loadAsync({
'material-community': require('@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf'),
}).then(() => setIsLoading(false));
});
if (isLoading) {
return <ActivityIndicator />;
}
return (
<SafeAreaProvider initialMetrics={initialWindowMetrics}>
<PaperProvider>
<ToastProvider>
<Application />
</ToastProvider>
</PaperProvider>
</SafeAreaProvider>
);
}