Skip to content

Commit

Permalink
Bump core for default params
Browse files Browse the repository at this point in the history
  • Loading branch information
brentvatne committed Oct 24, 2018
1 parent f34095e commit 308d380
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 25 deletions.
25 changes: 9 additions & 16 deletions examples/NavigationPlayground/js/StacksInTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ Praesent lobortis elit sit amet mauris pulvinar, viverra condimentum massa pelle

class MyNavScreen extends React.Component {
render() {
const { banner, navigation } = this.props;
const { navigation } = this.props;
const banner = navigation.getParam('banner');

return (
<ScrollView style={{ flex: 1 }}>
<SafeAreaView forceInset={{ horizontal: 'always' }}>
Expand Down Expand Up @@ -55,29 +57,18 @@ class MyNavScreen extends React.Component {
}
}

const MyHomeScreen = ({ navigation }) => (
<MyNavScreen banner="Home Screen" navigation={navigation} />
);

const MyProfileScreen = ({ navigation }) => (
<MyNavScreen
banner={`${navigation.state.params.name}s Profile`}
navigation={navigation}
/>
);

const MyNotificationsSettingsScreen = ({ navigation }) => (
<MyNavScreen banner="Notifications Screen" navigation={navigation} />
);

const MySettingsScreen = ({ navigation }) => (
<MyNavScreen banner="Settings Screen" navigation={navigation} />
);

const MainTab = createStackNavigator({
Home: {
screen: MyHomeScreen,
screen: MyNavScreen,
path: '/',
params: { banner: 'Home Screen' },
navigationOptions: {
title: 'Welcome',
},
Expand All @@ -93,14 +84,16 @@ const MainTab = createStackNavigator({

const SettingsTab = createStackNavigator({
Settings: {
screen: MySettingsScreen,
screen: MyNavScreen,
path: '/',
params: { banner: 'Settings Screen' },
navigationOptions: () => ({
title: 'Settings',
}),
},
NotifSettings: {
screen: MyNotificationsSettingsScreen,
screen: MyNavScreen,
params: { banner: 'Notifications Screen' },
navigationOptions: {
title: 'Notifications',
},
Expand Down
8 changes: 4 additions & 4 deletions examples/NavigationPlayground/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,10 @@
pouchdb-collections "^1.0.1"
tiny-queue "^0.2.1"

"@react-navigation/core@^3.0.0-alpha.12":
version "3.0.0-alpha.12"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.0.0-alpha.12.tgz#273f7be2bfe564f9ab28afd0955d21b72de9fadf"
integrity sha512-tUg57TuEtGpVmcyqTGbMYtHfE2VXgo6hB2XT/T/hYXXydQbgkPwu9VeavEzGTTc1QThxerYwJNAsog/EI0Za6Q==
"@react-navigation/core@^3.0.0-alpha.13":
version "3.0.0-alpha.13"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.0.0-alpha.13.tgz#7c0458e1054ebd24b3e4925b127e825503483d9d"
integrity sha512-3GDiItUJXHJUst60iW1t2J7BVtF+ZTCgwWvpqBHNT0OG0Dm8B1nLUjRLdofv/BvyXIvuGX//A3qpN8jRhSbnhQ==
dependencies:
create-react-context "^0.2.3"
hoist-non-react-statics "^3.0.1"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"react-native": "*"
},
"dependencies": {
"@react-navigation/core": "^3.0.0-alpha.12",
"@react-navigation/core": "^3.0.0-alpha.13",
"@react-navigation/native": "^3.0.0-alpha.8",
"react-navigation-drawer": "1.0.0-alpha.5",
"react-navigation-stack": "1.0.0-alpha.23",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
universal-user-agent "^2.0.0"
url-template "^2.0.8"

"@react-navigation/core@^3.0.0-alpha.12":
version "3.0.0-alpha.12"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.0.0-alpha.12.tgz#273f7be2bfe564f9ab28afd0955d21b72de9fadf"
integrity sha512-tUg57TuEtGpVmcyqTGbMYtHfE2VXgo6hB2XT/T/hYXXydQbgkPwu9VeavEzGTTc1QThxerYwJNAsog/EI0Za6Q==
"@react-navigation/core@^3.0.0-alpha.13":
version "3.0.0-alpha.13"
resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.0.0-alpha.13.tgz#7c0458e1054ebd24b3e4925b127e825503483d9d"
integrity sha512-3GDiItUJXHJUst60iW1t2J7BVtF+ZTCgwWvpqBHNT0OG0Dm8B1nLUjRLdofv/BvyXIvuGX//A3qpN8jRhSbnhQ==
dependencies:
create-react-context "^0.2.3"
hoist-non-react-statics "^3.0.1"
Expand Down

0 comments on commit 308d380

Please sign in to comment.