mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-01-24 21:08:15 +08:00
Compare commits
4 Commits
@react-nav
...
@react-nav
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d733066476 | ||
|
|
d0099f0968 | ||
|
|
c3e9e4578e | ||
|
|
cb426d06de |
@@ -3,6 +3,17 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [5.0.0-alpha.24](https://github.com/react-navigation/navigation-ex/compare/@react-navigation/core@5.0.0-alpha.23...@react-navigation/core@5.0.0-alpha.24) (2019-11-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* allow passing partial params to `setParams` ([#177](https://github.com/react-navigation/navigation-ex/issues/177)) ([c3e9e45](https://github.com/react-navigation/navigation-ex/commit/c3e9e4578e98aa5b0635949a288e19eaeec12c85))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [5.0.0-alpha.23](https://github.com/react-navigation/navigation-ex/compare/@react-navigation/core@5.0.0-alpha.22...@react-navigation/core@5.0.0-alpha.23) (2019-11-17)
|
# [5.0.0-alpha.23](https://github.com/react-navigation/navigation-ex/compare/@react-navigation/core@5.0.0-alpha.22...@react-navigation/core@5.0.0-alpha.23) (2019-11-17)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"react-native",
|
"react-native",
|
||||||
"react-navigation"
|
"react-navigation"
|
||||||
],
|
],
|
||||||
"version": "5.0.0-alpha.23",
|
"version": "5.0.0-alpha.24",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ export type NavigationHelpers<
|
|||||||
* @param params Params object for the current route.
|
* @param params Params object for the current route.
|
||||||
*/
|
*/
|
||||||
setParams<RouteName extends keyof ParamList>(
|
setParams<RouteName extends keyof ParamList>(
|
||||||
params: ParamList[RouteName]
|
params: Partial<ParamList[RouteName]>
|
||||||
): void;
|
): void;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -409,7 +409,7 @@ export type NavigationProp<
|
|||||||
*
|
*
|
||||||
* @param params Params object for the current route.
|
* @param params Params object for the current route.
|
||||||
*/
|
*/
|
||||||
setParams(params: ParamList[RouteName]): void;
|
setParams(params: Partial<ParamList[RouteName]>): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the options for the route.
|
* Update the options for the route.
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [5.0.0-alpha.23](https://github.com/react-navigation/navigation-ex/compare/@react-navigation/example@5.0.0-alpha.22...@react-navigation/example@5.0.0-alpha.23) (2019-11-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/example
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [5.0.0-alpha.22](https://github.com/satya164/navigation-ex/compare/@react-navigation/example@5.0.0-alpha.21...@react-navigation/example@5.0.0-alpha.22) (2019-11-17)
|
# [5.0.0-alpha.22](https://github.com/satya164/navigation-ex/compare/@react-navigation/example@5.0.0-alpha.21...@react-navigation/example@5.0.0-alpha.22) (2019-11-17)
|
||||||
|
|
||||||
**Note:** Version bump only for package @react-navigation/example
|
**Note:** Version bump only for package @react-navigation/example
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@react-navigation/example",
|
"name": "@react-navigation/example",
|
||||||
"description": "Demo app to showcase various functionality of React Navigation",
|
"description": "Demo app to showcase various functionality of React Navigation",
|
||||||
"version": "5.0.0-alpha.22",
|
"version": "5.0.0-alpha.23",
|
||||||
"private": true,
|
"private": true,
|
||||||
"workspaces": {
|
"workspaces": {
|
||||||
"nohoist": [
|
"nohoist": [
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
"react-native-reanimated-web": "npm:react-native-reanimated@^1.3.2",
|
"react-native-reanimated-web": "npm:react-native-reanimated@^1.3.2",
|
||||||
"react-native-safe-area-context": "~0.6.0",
|
"react-native-safe-area-context": "~0.6.0",
|
||||||
"react-native-screens": "^2.0.0-alpha.11",
|
"react-native-screens": "^2.0.0-alpha.11",
|
||||||
"react-native-tab-view": "2.10.2",
|
"react-native-tab-view": "2.11.0",
|
||||||
"react-native-unimodules": "^0.7.0-rc.1",
|
"react-native-unimodules": "^0.7.0-rc.1",
|
||||||
"react-native-web": "^0.11.7",
|
"react-native-web": "^0.11.7",
|
||||||
"scheduler": "^0.18.0",
|
"scheduler": "^0.18.0",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { View, StyleSheet } from 'react-native';
|
import { View, Text, ScrollView, StyleSheet } from 'react-native';
|
||||||
import { Button } from 'react-native-paper';
|
import { Button } from 'react-native-paper';
|
||||||
// eslint-disable-next-line import/no-unresolved
|
// eslint-disable-next-line import/no-unresolved
|
||||||
import { enableScreens } from 'react-native-screens';
|
import { enableScreens } from 'react-native-screens';
|
||||||
@@ -14,7 +14,6 @@ import {
|
|||||||
createNativeStackNavigator,
|
createNativeStackNavigator,
|
||||||
NativeStackNavigationProp,
|
NativeStackNavigationProp,
|
||||||
} from '@react-navigation/native-stack';
|
} from '@react-navigation/native-stack';
|
||||||
import Article from '../Shared/Article';
|
|
||||||
import Albums from '../Shared/Albums';
|
import Albums from '../Shared/Albums';
|
||||||
|
|
||||||
type NativeStackParams = {
|
type NativeStackParams = {
|
||||||
@@ -26,12 +25,11 @@ type NativeStackNavigation = NativeStackNavigationProp<NativeStackParams>;
|
|||||||
|
|
||||||
const ArticleScreen = ({
|
const ArticleScreen = ({
|
||||||
navigation,
|
navigation,
|
||||||
route,
|
|
||||||
}: {
|
}: {
|
||||||
navigation: NativeStackNavigation;
|
navigation: NativeStackNavigation;
|
||||||
route: RouteProp<NativeStackParams, 'article'>;
|
route: RouteProp<NativeStackParams, 'article'>;
|
||||||
}) => (
|
}) => (
|
||||||
<React.Fragment>
|
<ScrollView style={styles.container} contentContainerStyle={styles.content}>
|
||||||
<View style={styles.buttons}>
|
<View style={styles.buttons}>
|
||||||
<Button
|
<Button
|
||||||
mode="contained"
|
mode="contained"
|
||||||
@@ -48,8 +46,66 @@ const ArticleScreen = ({
|
|||||||
Go back
|
Go back
|
||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
<Article author={{ name: route.params.author }} />
|
<Text style={styles.title}>What is Lorem Ipsum?</Text>
|
||||||
</React.Fragment>
|
<Text style={styles.paragraph}>
|
||||||
|
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
|
||||||
|
Lorem Ipsum has been the industry's standard dummy text ever since
|
||||||
|
the 1500s, when an unknown printer took a galley of type and scrambled it
|
||||||
|
to make a type specimen book. It has survived not only five centuries, but
|
||||||
|
also the leap into electronic typesetting, remaining essentially
|
||||||
|
unchanged. It was popularised in the 1960s with the release of Letraset
|
||||||
|
sheets containing Lorem Ipsum passages, and more recently with desktop
|
||||||
|
publishing software like Aldus PageMaker including versions of Lorem
|
||||||
|
Ipsum.
|
||||||
|
</Text>
|
||||||
|
<Text style={styles.title}>Where does it come from?</Text>
|
||||||
|
<Text style={styles.paragraph}>
|
||||||
|
Contrary to popular belief, Lorem Ipsum is not simply random text. It has
|
||||||
|
roots in a piece of classical Latin literature from 45 BC, making it over
|
||||||
|
2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney
|
||||||
|
College in Virginia, looked up one of the more obscure Latin words,
|
||||||
|
consectetur, from a Lorem Ipsum passage, and going through the cites of
|
||||||
|
the word in classical literature, discovered the undoubtable source. Lorem
|
||||||
|
Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum
|
||||||
|
et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45
|
||||||
|
BC. This book is a treatise on the theory of ethics, very popular during
|
||||||
|
the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor
|
||||||
|
sit amet..", comes from a line in section 1.10.32.
|
||||||
|
</Text>
|
||||||
|
<Text style={styles.paragraph}>
|
||||||
|
The standard chunk of Lorem Ipsum used since the 1500s is reproduced below
|
||||||
|
for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus
|
||||||
|
Bonorum et Malorum" by Cicero are also reproduced in their exact
|
||||||
|
original form, accompanied by English versions from the 1914 translation
|
||||||
|
by H. Rackham.
|
||||||
|
</Text>
|
||||||
|
<Text style={styles.title}>Why do we use it?</Text>
|
||||||
|
<Text style={styles.paragraph}>
|
||||||
|
It is a long established fact that a reader will be distracted by the
|
||||||
|
readable content of a page when looking at its layout. The point of using
|
||||||
|
Lorem Ipsum is that it has a more-or-less normal distribution of letters,
|
||||||
|
as opposed to using "Content here, content here", making it look
|
||||||
|
like readable English. Many desktop publishing packages and web page
|
||||||
|
editors now use Lorem Ipsum as their default model text, and a search for
|
||||||
|
"lorem ipsum" will uncover many web sites still in their
|
||||||
|
infancy. Various versions have evolved over the years, sometimes by
|
||||||
|
accident, sometimes on purpose (injected humour and the like).
|
||||||
|
</Text>
|
||||||
|
<Text style={styles.title}>Where can I get some?</Text>
|
||||||
|
<Text style={styles.paragraph}>
|
||||||
|
There are many variations of passages of Lorem Ipsum available, but the
|
||||||
|
majority have suffered alteration in some form, by injected humour, or
|
||||||
|
randomised words which don't look even slightly believable. If you
|
||||||
|
are going to use a passage of Lorem Ipsum, you need to be sure there
|
||||||
|
isn't anything embarrassing hidden in the middle of text. All the
|
||||||
|
Lorem Ipsum generators on the Internet tend to repeat predefined chunks as
|
||||||
|
necessary, making this the first true generator on the Internet. It uses a
|
||||||
|
dictionary of over 200 Latin words, combined with a handful of model
|
||||||
|
sentence structures, to generate Lorem Ipsum which looks reasonable. The
|
||||||
|
generated Lorem Ipsum is therefore always free from repetition, injected
|
||||||
|
humour, or non-characteristic words etc.
|
||||||
|
</Text>
|
||||||
|
</ScrollView>
|
||||||
);
|
);
|
||||||
|
|
||||||
const AlbumsScreen = ({
|
const AlbumsScreen = ({
|
||||||
@@ -110,10 +166,11 @@ export default function NativeStackScreen({ navigation }: Props) {
|
|||||||
<NativeStack.Screen
|
<NativeStack.Screen
|
||||||
name="article"
|
name="article"
|
||||||
component={ArticleScreen}
|
component={ArticleScreen}
|
||||||
options={({ route }) => ({
|
options={{
|
||||||
title: `Article by ${route.params.author}`,
|
title: 'Lorem Ipsum',
|
||||||
})}
|
headerLargeTitle: true,
|
||||||
initialParams={{ author: 'Gandalf' }}
|
headerHideShadow: true,
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<NativeStack.Screen
|
<NativeStack.Screen
|
||||||
name="album"
|
name="album"
|
||||||
@@ -134,4 +191,24 @@ const styles = StyleSheet.create({
|
|||||||
button: {
|
button: {
|
||||||
margin: 8,
|
margin: 8,
|
||||||
},
|
},
|
||||||
|
container: {
|
||||||
|
backgroundColor: 'white',
|
||||||
|
},
|
||||||
|
content: {
|
||||||
|
paddingVertical: 16,
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
color: '#000',
|
||||||
|
fontWeight: 'bold',
|
||||||
|
fontSize: 24,
|
||||||
|
marginVertical: 8,
|
||||||
|
marginHorizontal: 16,
|
||||||
|
},
|
||||||
|
paragraph: {
|
||||||
|
color: '#000',
|
||||||
|
fontSize: 16,
|
||||||
|
lineHeight: 24,
|
||||||
|
marginVertical: 8,
|
||||||
|
marginHorizontal: 16,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [5.0.0-alpha.19](https://github.com/react-navigation/navigation-ex/compare/@react-navigation/material-top-tabs@5.0.0-alpha.18...@react-navigation/material-top-tabs@5.0.0-alpha.19) (2019-11-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/material-top-tabs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [5.0.0-alpha.18](https://github.com/react-navigation/navigation-ex/compare/@react-navigation/material-top-tabs@5.0.0-alpha.17...@react-navigation/material-top-tabs@5.0.0-alpha.18) (2019-11-17)
|
# [5.0.0-alpha.18](https://github.com/react-navigation/navigation-ex/compare/@react-navigation/material-top-tabs@5.0.0-alpha.17...@react-navigation/material-top-tabs@5.0.0-alpha.18) (2019-11-17)
|
||||||
|
|
||||||
**Note:** Version bump only for package @react-navigation/material-top-tabs
|
**Note:** Version bump only for package @react-navigation/material-top-tabs
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"material",
|
"material",
|
||||||
"tab"
|
"tab"
|
||||||
],
|
],
|
||||||
"version": "5.0.0-alpha.18",
|
"version": "5.0.0-alpha.19",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
"react-native": "~0.59.10",
|
"react-native": "~0.59.10",
|
||||||
"react-native-gesture-handler": "^1.5.0",
|
"react-native-gesture-handler": "^1.5.0",
|
||||||
"react-native-reanimated": "^1.4.0",
|
"react-native-reanimated": "^1.4.0",
|
||||||
"react-native-tab-view": "^2.10.1",
|
"react-native-tab-view": "^2.11.0",
|
||||||
"typescript": "^3.7.2"
|
"typescript": "^3.7.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
"react-native": "*",
|
"react-native": "*",
|
||||||
"react-native-gesture-handler": "^1.0.0",
|
"react-native-gesture-handler": "^1.0.0",
|
||||||
"react-native-reanimated": "^1.0.0",
|
"react-native-reanimated": "^1.0.0",
|
||||||
"react-native-tab-view": "^2.10.0"
|
"react-native-tab-view": "^2.11.0"
|
||||||
},
|
},
|
||||||
"@react-native-community/bob": {
|
"@react-native-community/bob": {
|
||||||
"source": "src",
|
"source": "src",
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [5.0.0-alpha.14](https://github.com/react-navigation/navigation-ex/compare/@react-navigation/native-stack@5.0.0-alpha.13...@react-navigation/native-stack@5.0.0-alpha.14) (2019-11-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/native-stack
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [5.0.0-alpha.13](https://github.com/react-navigation/navigation-ex/compare/@react-navigation/native-stack@5.0.0-alpha.12...@react-navigation/native-stack@5.0.0-alpha.13) (2019-11-17)
|
# [5.0.0-alpha.13](https://github.com/react-navigation/navigation-ex/compare/@react-navigation/native-stack@5.0.0-alpha.12...@react-navigation/native-stack@5.0.0-alpha.13) (2019-11-17)
|
||||||
|
|
||||||
**Note:** Version bump only for package @react-navigation/native-stack
|
**Note:** Version bump only for package @react-navigation/native-stack
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"react-native",
|
"react-native",
|
||||||
"react-navigation"
|
"react-navigation"
|
||||||
],
|
],
|
||||||
"version": "5.0.0-alpha.13",
|
"version": "5.0.0-alpha.14",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ export type NativeStackNavigationOptions = {
|
|||||||
headerTranslucent?: boolean;
|
headerTranslucent?: boolean;
|
||||||
/**
|
/**
|
||||||
* Boolean to set native property to prefer large title header (like in iOS setting).
|
* Boolean to set native property to prefer large title header (like in iOS setting).
|
||||||
|
* For large title to collapse on scroll, the content of the screen should be wrapped in a scrollable view such as `ScrollView` or `FlatList`.
|
||||||
|
* If the scrollable area doesn't fill the screen, the large title won't collapse on scroll.
|
||||||
* Only supported on iOS.
|
* Only supported on iOS.
|
||||||
*
|
*
|
||||||
* @platform ios
|
* @platform ios
|
||||||
|
|||||||
13
yarn.lock
13
yarn.lock
@@ -13220,15 +13220,10 @@ react-native-screens@^2.0.0-alpha.11:
|
|||||||
dependencies:
|
dependencies:
|
||||||
debounce "^1.2.0"
|
debounce "^1.2.0"
|
||||||
|
|
||||||
react-native-tab-view@2.10.2:
|
react-native-tab-view@2.11.0, react-native-tab-view@^2.11.0:
|
||||||
version "2.10.2"
|
version "2.11.0"
|
||||||
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-2.10.2.tgz#35ae92f574f2220312138f479a99ad3cbf981b6f"
|
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-2.11.0.tgz#2e57d1f617ccc88c7f452708804f3409f880b700"
|
||||||
integrity sha512-DJMz7WDlQiykgvojaEPM5MKFNMlGC89SMhX++wkD6iJ4TK04NyUgvUKsZYuY7u6k0o0HtG7sNeexFsbxfwhrVg==
|
integrity sha512-vqetlxGO7A8bnqvXcB50MWpRZAImXFrDGz1WCQKdCqe03Ey3ZzENe7yLuWrtBJYlepGfOLAsmCXv+wW82Yfm1w==
|
||||||
|
|
||||||
react-native-tab-view@^2.10.1:
|
|
||||||
version "2.10.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-2.10.1.tgz#3ddff9858a1f7da7477dc9f52a69a6bf17f31541"
|
|
||||||
integrity sha512-U4swsor8h1A1mkBFUX+k1FXvijVsh7ZhD01O0cxKjR5Q7hBXCCygP3rs9jCjnoRMhyMJHsbmeZypUs5l+mVdGQ==
|
|
||||||
|
|
||||||
react-native-testing-library@^1.9.1:
|
react-native-testing-library@^1.9.1:
|
||||||
version "1.11.1"
|
version "1.11.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user