Wrap the WebView example too

This commit is contained in:
Brent Vatne 2018-09-24 17:57:20 -07:00
parent 5eac729fc3
commit 53d191455b
1 changed files with 15 additions and 17 deletions

View File

@ -33,26 +33,24 @@ MapScreen.navigationOptions = {
title: 'MapView',
};
const WebViewScreen = () => (
<NativeViewGestureHandler>
<WebView style={{ flex: 1 }} source={{ uri: 'https://news.google.com' }} />
</NativeViewGestureHandler>
<GestureContext.Consumer>
{ref => (
<NativeViewGestureHandler waitFor={ref}>
<WebView
style={{ flex: 1 }}
source={{ uri: 'https://news.google.com' }}
/>
</NativeViewGestureHandler>
)}
</GestureContext.Consumer>
);
WebViewScreen.navigationOptions = {
title: 'WebView',
};
const DrawerExample = createStackNavigator(
{
Index: IndexScreen,
Map: MapScreen,
Web: WebViewScreen,
},
{
contentOptions: {
activeTintColor: '#e91e63',
},
}
);
export default DrawerExample;
export default createStackNavigator({
Index: IndexScreen,
Map: MapScreen,
Web: WebViewScreen,
});