Skip to content

Commit 3539acb

Browse files
brentvatnesourcecode911
authored andcommitted
Rename exports for navigators from XNavigator to createXNavigator
1 parent 92e1abd commit 3539acb

19 files changed

+2156
-736
lines changed

examples/NavigationPlayground/flow-typed/npm/react-native_vx.x.x.js

Lines changed: 2072 additions & 692 deletions
Large diffs are not rendered by default.

examples/NavigationPlayground/js/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
StatusBar,
1717
View,
1818
} from 'react-native';
19-
import { SafeAreaView, StackNavigator } from 'react-navigation';
19+
import { SafeAreaView, createStackNavigator } from 'react-navigation';
2020

2121
import CustomTabs from './CustomTabs';
2222
import CustomTransitioner from './CustomTransitioner';
@@ -288,7 +288,7 @@ class MainScreen extends React.Component<any, State> {
288288
}
289289
}
290290

291-
const AppNavigator = StackNavigator(
291+
const AppNavigator = createStackNavigator(
292292
{
293293
...ExampleRoutes,
294294
Index: {

examples/NavigationPlayground/js/Drawer.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import React from 'react';
66
import { Platform, ScrollView, StatusBar } from 'react-native';
77
import {
8-
StackNavigator,
9-
DrawerNavigator,
8+
createStackNavigator,
9+
createDrawerNavigator,
1010
SafeAreaView,
1111
} from 'react-navigation';
1212
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
@@ -56,17 +56,17 @@ DraftsScreen.navigationOptions = {
5656
),
5757
};
5858

59-
const InboxStack = StackNavigator({
59+
const InboxStack = createStackNavigator({
6060
Inbox: { screen: InboxScreen },
6161
Email: { screen: EmailScreen },
6262
});
6363

64-
const DraftsStack = StackNavigator({
64+
const DraftsStack = createStackNavigator({
6565
Drafts: { screen: DraftsScreen },
6666
Email: { screen: EmailScreen },
6767
});
6868

69-
const DrawerExample = DrawerNavigator(
69+
const DrawerExample = createDrawerNavigator(
7070
{
7171
Inbox: {
7272
path: '/',

examples/NavigationPlayground/js/ModalStack.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import React from 'react';
66
import { ScrollView, StatusBar, Text } from 'react-native';
7-
import { SafeAreaView, StackNavigator } from 'react-navigation';
7+
import { SafeAreaView, createStackNavigator } from 'react-navigation';
88
import SampleText from './SampleText';
99
import { Button } from './commonComponents/ButtonWithMargin';
1010

@@ -59,7 +59,7 @@ MyProfileScreen.navigationOptions = ({ navigation }) => ({
5959
title: `${navigation.state.params.name}'s Profile!`,
6060
});
6161

62-
const ProfileNavigator = StackNavigator(
62+
const ProfileNavigator = createStackNavigator(
6363
{
6464
Home: {
6565
screen: MyHomeScreen,
@@ -89,7 +89,7 @@ MyHeaderTestScreen.navigationOptions = ({ navigation }) => {
8989
};
9090
};
9191

92-
const ModalStack = StackNavigator(
92+
const ModalStack = createStackNavigator(
9393
{
9494
ProfileNavigator: {
9595
screen: ProfileNavigator,

examples/NavigationPlayground/js/MultipleDrawer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import React from 'react';
66
import { Platform, ScrollView, StyleSheet } from 'react-native';
7-
import { DrawerNavigator } from 'react-navigation';
7+
import { createDrawerNavigator } from 'react-navigation';
88
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
99
import SampleText from './SampleText';
1010
import { Button } from './commonComponents/ButtonWithMargin';
@@ -41,7 +41,7 @@ DraftsScreen.navigationOptions = {
4141
),
4242
};
4343

44-
const DrawerExample = DrawerNavigator(
44+
const DrawerExample = createDrawerNavigator(
4545
{
4646
Inbox: {
4747
path: '/',
@@ -60,7 +60,7 @@ const DrawerExample = DrawerNavigator(
6060
}
6161
);
6262

63-
const MainDrawerExample = DrawerNavigator({
63+
const MainDrawerExample = createDrawerNavigator({
6464
Drafts: {
6565
screen: DrawerExample,
6666
},

examples/NavigationPlayground/js/SimpleStack.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ import type {
99

1010
import * as React from 'react';
1111
import { ScrollView, StatusBar } from 'react-native';
12-
import { StackNavigator, SafeAreaView, withNavigation } from 'react-navigation';
12+
import {
13+
createStackNavigator,
14+
SafeAreaView,
15+
withNavigation,
16+
} from 'react-navigation';
1317
import SampleText from './SampleText';
1418
import { Button } from './commonComponents/ButtonWithMargin';
1519
import { HeaderButtons } from './commonComponents/HeaderButtons';
@@ -187,7 +191,7 @@ MyProfileScreen.navigationOptions = props => {
187191
};
188192
};
189193

190-
const SimpleStack = StackNavigator({
194+
const SimpleStack = createStackNavigator({
191195
Home: {
192196
screen: MyHomeScreen,
193197
},

examples/NavigationPlayground/js/SimpleTabs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type {
99

1010
import React from 'react';
1111
import { Platform, ScrollView, StatusBar, View } from 'react-native';
12-
import { SafeAreaView, TabNavigator } from 'react-navigation';
12+
import { SafeAreaView, createTabNavigator } from 'react-navigation';
1313
import Ionicons from 'react-native-vector-icons/Ionicons';
1414
import SampleText from './SampleText';
1515
import { Button } from './commonComponents/ButtonWithMargin';
@@ -144,7 +144,7 @@ MySettingsScreen.navigationOptions = {
144144
),
145145
};
146146

147-
const SimpleTabs = TabNavigator(
147+
const SimpleTabs = createTabNavigator(
148148
{
149149
Home: {
150150
screen: MyHomeScreen,

examples/NavigationPlayground/js/StackWithCustomHeaderBackImage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { NavigationScreenProp } from 'react-navigation';
66

77
import * as React from 'react';
88
import { Image, Button, StatusBar, StyleSheet } from 'react-native';
9-
import { StackNavigator, SafeAreaView } from 'react-navigation';
9+
import { createStackNavigator, SafeAreaView } from 'react-navigation';
1010
import SampleText from './SampleText';
1111

1212
type MyNavScreenProps = {
@@ -107,7 +107,7 @@ class MyProfileScreen extends React.Component<MyProfileScreenProps> {
107107
}
108108
}
109109

110-
const StackWithCustomHeaderBackImage = StackNavigator(
110+
const StackWithCustomHeaderBackImage = createStackNavigator(
111111
{
112112
Home: {
113113
screen: MyHomeScreen,

examples/NavigationPlayground/js/StackWithHeaderPreset.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { NavigationScreenProp } from 'react-navigation';
55

66
import * as React from 'react';
77
import { ScrollView, StatusBar } from 'react-native';
8-
import { StackNavigator, SafeAreaView } from 'react-navigation';
8+
import { createStackNavigator, SafeAreaView } from 'react-navigation';
99
import { Button } from './commonComponents/ButtonWithMargin';
1010

1111
type NavScreenProps = {
@@ -56,7 +56,7 @@ class OtherScreen extends React.Component<NavScreenProps> {
5656
}
5757
}
5858

59-
const StackWithHeaderPreset = StackNavigator(
59+
const StackWithHeaderPreset = createStackNavigator(
6060
{
6161
Home: HomeScreen,
6262
Other: OtherScreen,

examples/NavigationPlayground/js/StackWithTranslucentHeader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
StatusBar,
1919
View,
2020
} from 'react-native';
21-
import { Header, StackNavigator } from 'react-navigation';
21+
import { Header, createStackNavigator } from 'react-navigation';
2222
import SampleText from './SampleText';
2323
import { Button } from './commonComponents/ButtonWithMargin';
2424
import { HeaderButtons } from './commonComponents/HeaderButtons';
@@ -206,7 +206,7 @@ MyProfileScreen.navigationOptions = props => {
206206
};
207207
};
208208

209-
const StackWithTranslucentHeader = StackNavigator(
209+
const StackWithTranslucentHeader = createStackNavigator(
210210
{
211211
Home: {
212212
screen: MyHomeScreen,

0 commit comments

Comments
 (0)