Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {useScreens} from 'react-native-screens';
import createNativeStackNavigator from 'react-native-screens/createNativeStackNavigator';
import {createAppContainer} from 'react-navigation';
import Home from './src/screens/home';
import InfiniteScrollExample from './src/screens/infiniteScroll';
import SpeedScreen from './src/screens/speed';
useScreens();
const appStack = createNativeStackNavigator(
{
Home: {
screen: Home,
},
InfiniteScroll: {
screen: InfiniteScrollExample,
},
SpeedScreen: {
screen: SpeedScreen,
},
},
{
initialRouteName: 'Home',
headerMode: 'none',
// transparentCard: true,
// mode: 'modal',
headerTintColor: 'black',
// header: null,
// translucent: true,
// gestureEnabled: false,
},
},
},
{
initialRouteName: 'Some',
// headerMode: 'none',
// transparentCard: true,
// mode: 'modal',
}
);
const App = createNativeStackNavigator(
{
Root: { screen: AppStack },
Modal: PushScreen,
},
{
mode: 'modal',
headerMode: 'none',
}
);
const styles = StyleSheet.create({
screen: {
...StyleSheet.absoluteFillObject,
paddingTop: 200,
flex: 1,
backgroundColor: 'white',
<button> this.props.navigation.goBack()}
title="Go back"
/>
</button><button> this.props.navigation.push('Push')}
title="Push more"
/>
</button><button> alert('This is a button!')} title="Info" />
),
// translucent: true,
// largeTitle: true,
}),</button>
},
{
defaultNavigationOptions: {
onTransitionEnd,
onTransitionStart,
},
headerMode: 'none',
initialRouteName: 'SwipeLayout',
mode: 'modal',
}
);
let appearListener = null;
const setListener = listener => (appearListener = listener);
const NativeStack = createNativeStackNavigator(
{
ImportSeedPhraseSheet: function ImportSeedPhraseSheetWrapper(...props) {
return (
);
},
MainNavigator,
SendSheet: function SendSheetWrapper(...props) {
return ;
},
},
{
defaultNavigationOptions: {