How to use the react-native-screens.enableScreens function in react-native-screens

To help you get started, we’ve selected a few react-native-screens examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo / apps / native-component-list / App.tsx View on Github external
import * as React from 'react';
import { AppLoading } from 'expo';
import * as Font from 'expo-font';
import { Asset } from 'expo-asset';
import { Entypo, Ionicons, MaterialIcons } from '@expo/vector-icons';
import { Platform, StatusBar, StyleSheet, View } from 'react-native';
import { Assets as StackAssets } from 'react-navigation-stack';
import { enableScreens } from 'react-native-screens';
import { AppearanceProvider, useColorScheme, ColorSchemeName } from 'react-native-appearance';

import Icons from './src/constants/Icons';
import RootNavigation from './src/navigation/RootNavigation';

if (Platform.OS === 'android') {
  enableScreens(true);
}

const initialState = {
  appIsReady: false,
};

type Props = { colorScheme: ColorSchemeName };
type State = typeof initialState;

export default function AppContainer() {
  let colorScheme = useColorScheme();
  return (
    
      
    
  );
github react-navigation / navigation-ex / example / src / Screens / NativeStack.tsx View on Github external
options={{
          title: 'Lorem Ipsum',
          headerLargeTitle: true,
          headerHideShadow: true,
        }}
      />
      
    
  );
}

enableScreens(true);

const styles = StyleSheet.create({
  buttons: {
    flexDirection: 'row',
    padding: 8,
  },
  button: {
    margin: 8,
  },
  content: {
    paddingVertical: 16,
  },
  title: {
    fontWeight: 'bold',
    fontSize: 24,
    marginVertical: 8,