From a12184414837351753b2710a57f02fbee2b612d4 Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Wed, 5 Feb 2020 14:47:36 +0100 Subject: [PATCH] chore: prepare for stable release (#354) --- .github/ISSUE_TEMPLATE/config.yml | 6 +- .github/workflows/expo-preview.yml | 2 +- README.md | 10 +-- example/app.json | 2 +- lerna.json | 2 - packages/bottom-tabs/README.md | 78 +----------------- packages/bottom-tabs/package.json | 4 +- .../src/views/SafeAreaProviderCompat.tsx | 2 +- packages/compat/README.md | 27 +------ packages/compat/package.json | 8 +- packages/core/README.md | 2 +- packages/core/package.json | 8 +- packages/drawer/README.md | 58 +------------ packages/drawer/package.json | 10 ++- .../src/views/SafeAreaProviderCompat.tsx | 2 +- packages/material-bottom-tabs/README.md | 59 +------------- packages/material-bottom-tabs/package.json | 10 ++- packages/material-top-tabs/README.md | 66 +-------------- packages/material-top-tabs/package.json | 10 ++- packages/native-stack/README.md | 81 +------------------ packages/native-stack/package.json | 10 ++- packages/native/README.md | 47 +---------- packages/native/package.json | 8 +- packages/routers/README.md | 25 +----- packages/routers/package.json | 8 +- packages/stack/README.md | 65 +-------------- packages/stack/package.json | 10 ++- .../src/views/SafeAreaProviderCompat.tsx | 2 +- 28 files changed, 85 insertions(+), 537 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index ad1126a0..d30563a8 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,10 +1,12 @@ blank_issues_enabled: false contact_links: + - name: Bugs for React Navigation 4 + url: https://github.com/react-navigation/react-navigation-4/issues/new/choose - name: Troubleshooting - url: https://reactnavigation.org/docs/en/next/troubleshooting.html + url: https://reactnavigation.org/docs/troubleshooting.html about: Read how to troubleshoot and fix common issues and mistakes. - name: Documentation - url: https://next.reactnavigation.org + url: https://reactnavigation.org about: Read the official documentation. - name: Feature requests url: https://react-navigation.canny.io/feature-requests diff --git a/.github/workflows/expo-preview.yml b/.github/workflows/expo-preview.yml index 5aacb6ef..86e94e4d 100644 --- a/.github/workflows/expo-preview.yml +++ b/.github/workflows/expo-preview.yml @@ -44,7 +44,7 @@ jobs: - name: Get expo link id: expo - run: echo "::set-output name=path::@react-navigation/react-navigation-example?release-channel=pr-${{ github.event.number }}" + run: echo "::set-output name=path::@react-navigation/react-react-navigationample?release-channel=pr-${{ github.event.number }}" - name: Comment on PR uses: unsplash/comment-on-pr@master diff --git a/README.md b/README.md index c890bad8..4788759e 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Routing and navigation for your React Native apps with a component-first API. -Documentation can be found at [next.reactnavigation.org](https://next.reactnavigation.org/). +Documentation can be found at [next.reactnavigation.org](https://reactnavigation.org/). ## Contributing @@ -106,9 +106,9 @@ Remember to replace ``, `` and `` with right values. -[build-badge]: https://img.shields.io/circleci/project/github/react-navigation/navigation-ex/master.svg?style=flat-square -[build]: https://circleci.com/gh/react-navigation/navigation-ex -[coverage-badge]: https://img.shields.io/codecov/c/github/react-navigation/navigation-ex.svg?style=flat-square -[coverage]: https://codecov.io/github/react-navigation/navigation-ex +[build-badge]: https://img.shields.io/circleci/project/github/react-navigation/react-navigation/master.svg?style=flat-square +[build]: https://circleci.com/gh/react-navigation/react-navigation +[coverage-badge]: https://img.shields.io/codecov/c/github/react-navigation/react-navigation.svg?style=flat-square +[coverage]: https://codecov.io/github/react-navigation/react-navigation [license-badge]: https://img.shields.io/npm/l/@react-navigation/core.svg?style=flat-square [license]: https://opensource.org/licenses/MIT diff --git a/example/app.json b/example/app.json index 1ed426f0..e7015068 100644 --- a/example/app.json +++ b/example/app.json @@ -4,7 +4,7 @@ "expo": { "name": "@react-navigation/example", "owner": "react-navigation", - "slug": "react-navigation-example", + "slug": "react-react-navigationample", "description": "Demo app to showcase various functionality of React Navigation", "privacy": "public", "sdkVersion": "36.0.0", diff --git a/lerna.json b/lerna.json index 97c009f5..71ec28ae 100644 --- a/lerna.json +++ b/lerna.json @@ -11,8 +11,6 @@ "allowBranch": "master", "conventionalCommits": true, "createRelease": "github", - "preId": "alpha", - "preDistTag": "next", "message": "chore: publish", "ignoreChanges": [ "**/__fixtures__/**", diff --git a/packages/bottom-tabs/README.md b/packages/bottom-tabs/README.md index a1ce2619..36c8eb53 100644 --- a/packages/bottom-tabs/README.md +++ b/packages/bottom-tabs/README.md @@ -2,80 +2,4 @@ Bottom tab navigator for React Navigation following iOS design guidelines. -Documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/en/next/bottom-tab-navigator.html). - -## Installation - -Open a Terminal in your project's folder and run, - -```sh -yarn add @react-navigation/native @react-navigation/bottom-tabs -``` - -Now we need to install [`react-native-safe-area-context`](https://github.com/th3rdwave/react-native-safe-area-context). - -If you are using Expo, to ensure that you get the compatible versions of the libraries, run: - -```sh -expo install react-native-safe-area-context -``` - -If you are not using Expo, run the following: - -```sh -yarn add react-native-safe-area-context -``` - -If you are using Expo, you are done. Otherwise, continue to the next steps. - -To complete the linking on iOS, make sure you have [Cocoapods](https://cocoapods.org/) installed. Then run: - -```sh -cd ios -pod install -cd .. -``` - -## Usage - -```js -import { MaterialCommunityIcons } from 'react-native-vector-icons'; -import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; - -const getTabBarIcon = name => ({ color, size }) => ( - -); - -const BottomTabs = createBottomTabNavigator(); - -export default function App() { - return ( - - - - - - ); -} -``` +Installation instructions and documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/bottom-tab-navigator.html). diff --git a/packages/bottom-tabs/package.json b/packages/bottom-tabs/package.json index 1fb328e5..0105b1e6 100644 --- a/packages/bottom-tabs/package.json +++ b/packages/bottom-tabs/package.json @@ -12,7 +12,7 @@ ], "version": "5.0.0-alpha.45", "license": "MIT", - "repository": "https://github.com/react-navigation/navigation-ex/tree/master/packages/bottom-tabs", + "repository": "https://github.com/react-navigation/react-navigation/tree/master/packages/bottom-tabs", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", "module": "lib/module/index.js", @@ -46,7 +46,7 @@ "typescript": "^3.7.4" }, "peerDependencies": { - "@react-navigation/native": "^5.0.0-alpha.0", + "@react-navigation/native": "^5.0.0", "react": "*", "react-native": "*", "react-native-safe-area-context": "^0.6.0" diff --git a/packages/bottom-tabs/src/views/SafeAreaProviderCompat.tsx b/packages/bottom-tabs/src/views/SafeAreaProviderCompat.tsx index 2088a12e..f6030610 100644 --- a/packages/bottom-tabs/src/views/SafeAreaProviderCompat.tsx +++ b/packages/bottom-tabs/src/views/SafeAreaProviderCompat.tsx @@ -26,7 +26,7 @@ export default function SafeAreaProviderCompat({ children }: Props) { if (insets) { // If we already have insets, don't wrap the stack in another safe area provider // This avoids an issue with updates at the cost of potentially incorrect values - // https://github.com/react-navigation/navigation-ex/issues/174 + // https://github.com/react-navigation/react-navigation/issues/174 return children; } diff --git a/packages/compat/README.md b/packages/compat/README.md index 627f7c98..f13235e3 100644 --- a/packages/compat/README.md +++ b/packages/compat/README.md @@ -2,29 +2,4 @@ Compatibility layer to write navigator definitions in static configuration format. -Documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/en/next/compatibility.html). - -## Installation - -Open a Terminal in your project's folder and run, - -```sh -yarn add @react-navigation/native @react-navigation/compat -``` - -## Usage - -```js -import { createCompatNavigatorFactory } from '@react-navigation/compat'; -import { createStackNavigator } from '@react-navigation/stack'; - -const RootStack = createCompatNavigatorFactory(createStackNavigator)( - { - Home: { screen: HomeScreen }, - Profile: { screen: ProfileScreen }, - }, - { - initialRouteName: 'Profile', - } -); -``` +Installation instructions and documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/compatibility.html). diff --git a/packages/compat/package.json b/packages/compat/package.json index 9e798ed0..3576f12a 100644 --- a/packages/compat/package.json +++ b/packages/compat/package.json @@ -3,7 +3,11 @@ "description": "Compatibility layer to write navigator definitions in static configuration format", "version": "5.0.0-alpha.34", "license": "MIT", - "repository": "https://github.com/react-navigation/navigation-ex/tree/master/packages/compat", + "repository": "https://github.com/react-navigation/react-navigation/tree/master/packages/compat", + "bugs": { + "url": "https://github.com/react-navigation/react-navigation/issues" + }, + "homepage": "https://reactnavigation.org/docs/compatibility.html", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", "module": "lib/module/index.js", @@ -29,7 +33,7 @@ "typescript": "^3.7.4" }, "peerDependencies": { - "@react-navigation/native": "^5.0.0-alpha.0", + "@react-navigation/native": "^5.0.0", "react": "~16.9.0" }, "@react-native-community/bob": { diff --git a/packages/core/README.md b/packages/core/README.md index a2393d95..94939e84 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -1,6 +1,6 @@ # `@react-navigation/core` -Core utilities for building navigators. +Core utilities for building navigators independent of the platform. ## Installation diff --git a/packages/core/package.json b/packages/core/package.json index 477b6906..1840f8d1 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,14 +1,18 @@ { "name": "@react-navigation/core", "description": "Core utilities for building navigators", + "version": "5.0.0-alpha.40", "keywords": [ "react", "react-native", "react-navigation" ], - "version": "5.0.0-alpha.43", "license": "MIT", - "repository": "https://github.com/react-navigation/navigation-ex/tree/master/packages/core", + "repository": "https://github.com/react-navigation/react-navigation/tree/master/packages/core", + "bugs": { + "url": "https://github.com/react-navigation/react-navigation/issues" + }, + "homepage": "https://reactnavigation.org", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", "module": "lib/module/index.js", diff --git a/packages/drawer/README.md b/packages/drawer/README.md index 7e28a982..bb8120d1 100644 --- a/packages/drawer/README.md +++ b/packages/drawer/README.md @@ -2,60 +2,4 @@ Bottom tab navigator for React Navigation following iOS design guidelines. -Documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/en/next/drawer-navigator.html). - -## Installation - -Open a Terminal in your project's folder and run, - -```sh -yarn add @react-navigation/native @react-navigation/drawer -``` - -Now we need to install [`react-native-gesture-handler`](https://github.com/kmagiera/react-native-gesture-handler), [`react-native-reanimated`](https://github.com/kmagiera/react-native-reanimated) and [`react-native-safe-area-context`](https://github.com/th3rdwave/react-native-safe-area-context). - -If you are using Expo, to ensure that you get the compatible versions of the libraries, run: - -```sh -expo install react-native-gesture-handler react-native-reanimated react-native-safe-area-context -``` - -If you are not using Expo, run the following: - -```sh -yarn add react-native-reanimated react-native-gesture-handler react-native-safe-area-context -``` - -If you are using Expo, you are done. Otherwise, continue to the next steps. - -To complete the linking on iOS, make sure you have [Cocoapods](https://cocoapods.org/) installed. Then run: - -```sh -cd ios -pod install -cd .. -``` - -**IMPORTANT:** There are additional steps required for `react-native-gesture-handler` on Android after linking (for all React Native versions). Check the [this guide](https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html) to complete the installation. - -## Usage - -```js -import { createDrawerNavigator } from '@react-navigation/drawer'; - -const Drawer = createDrawerNavigator(); - -export default function App() { - return ( - - - - - - ); -} -``` +Installation instructions and documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/drawer-navigator.html). diff --git a/packages/drawer/package.json b/packages/drawer/package.json index d87901a1..66f31913 100644 --- a/packages/drawer/package.json +++ b/packages/drawer/package.json @@ -1,6 +1,7 @@ { "name": "@react-navigation/drawer", "description": "Drawer navigator component with animated transitions and gesturess", + "version": "5.0.0-alpha.44", "keywords": [ "react-native-component", "react-component", @@ -11,9 +12,12 @@ "material", "drawer" ], - "version": "5.0.0-alpha.47", "license": "MIT", - "repository": "https://github.com/react-navigation/navigation-ex/tree/master/packages/drawer", + "repository": "https://github.com/react-navigation/react-navigation/tree/master/packages/drawer", + "bugs": { + "url": "https://github.com/react-navigation/react-navigation/issues" + }, + "homepage": "https://reactnavigation.org/docs/drawer-navigator.html", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", "module": "lib/module/index.js", @@ -49,7 +53,7 @@ "typescript": "^3.7.4" }, "peerDependencies": { - "@react-navigation/native": "^5.0.0-alpha.0", + "@react-navigation/native": "^5.0.0", "react": "*", "react-native": "*", "react-native-gesture-handler": "^1.0.0", diff --git a/packages/drawer/src/views/SafeAreaProviderCompat.tsx b/packages/drawer/src/views/SafeAreaProviderCompat.tsx index 2088a12e..f6030610 100644 --- a/packages/drawer/src/views/SafeAreaProviderCompat.tsx +++ b/packages/drawer/src/views/SafeAreaProviderCompat.tsx @@ -26,7 +26,7 @@ export default function SafeAreaProviderCompat({ children }: Props) { if (insets) { // If we already have insets, don't wrap the stack in another safe area provider // This avoids an issue with updates at the cost of potentially incorrect values - // https://github.com/react-navigation/navigation-ex/issues/174 + // https://github.com/react-navigation/react-navigation/issues/174 return children; } diff --git a/packages/material-bottom-tabs/README.md b/packages/material-bottom-tabs/README.md index e99ed427..d52d6a88 100644 --- a/packages/material-bottom-tabs/README.md +++ b/packages/material-bottom-tabs/README.md @@ -2,61 +2,4 @@ React Navigation integration for [bottom navigation](https://material.io/design/components/bottom-navigation.html) component from [`react-native-paper`](https://callstack.github.io/react-native-paper/bottom-navigation.html). -Documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/en/next/material-bottom-tab-navigator.html). - -## Installation - -Open a Terminal in your project's folder and run, - -```sh -yarn add @react-navigation/native @react-navigation/material-bottom-tabs -``` - -Setup `react-native-paper` following the [Getting Started guide](https://callstack.github.io/react-native-paper/getting-started.html). - -## Usage - -```js -import { createMaterialBottomTabNavigator } from '@react-navigation/material-bottom-tabs'; - -const MaterialBottomTabs = createMaterialBottomTabNavigator(); - -export default function App() { - return ( - - - - - - - ); -} -``` +Installation instructions and documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/material-bottom-tab-navigator.html). diff --git a/packages/material-bottom-tabs/package.json b/packages/material-bottom-tabs/package.json index 8bd0e806..2775a021 100644 --- a/packages/material-bottom-tabs/package.json +++ b/packages/material-bottom-tabs/package.json @@ -1,6 +1,7 @@ { "name": "@react-navigation/material-bottom-tabs", "description": "Integration for bottom navigation component from react-native-paper", + "version": "5.0.0-alpha.39", "keywords": [ "react-native-component", "react-component", @@ -11,9 +12,12 @@ "material", "tab" ], - "version": "5.0.0-alpha.42", "license": "MIT", - "repository": "https://github.com/react-navigation/navigation-ex/tree/master/packages/material-bottom-tabs", + "repository": "https://github.com/react-navigation/react-navigation/tree/master/packages/material-bottom-tabs", + "bugs": { + "url": "https://github.com/react-navigation/react-navigation/issues" + }, + "homepage": "https://reactnavigation.org/docs/material-bottom-tab-navigator.html", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", "module": "lib/module/index.js", @@ -46,7 +50,7 @@ "typescript": "^3.7.4" }, "peerDependencies": { - "@react-navigation/native": "^5.0.0-alpha.0", + "@react-navigation/native": "^5.0.0", "react": "*", "react-native": "*", "react-native-paper": "^3.5.0", diff --git a/packages/material-top-tabs/README.md b/packages/material-top-tabs/README.md index a151df47..67814561 100644 --- a/packages/material-top-tabs/README.md +++ b/packages/material-top-tabs/README.md @@ -2,68 +2,4 @@ React Navigation integration for animated tab view component from [`react-native-tab-view`](https://github.com/react-native-community/react-native-tab-view). -Documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/en/next/material-top-tab-navigator.html). - -## Installation - -Open a Terminal in your project's folder and run, - -```sh -yarn add @react-navigation/native @react-navigation/material-top-tabs react-native-tab-view -``` - -Now we need to install [`react-native-gesture-handler`](https://github.com/kmagiera/react-native-gesture-handler) and [`react-native-reanimated`](https://github.com/kmagiera/react-native-reanimated).. - -If you are using Expo, to ensure that you get the compatible versions of the libraries, run: - -```sh -expo install react-native-gesture-handler react-native-reanimated -``` - -If you are not using Expo, run the following: - -```sh -yarn add react-native-reanimated react-native-gesture-handler -``` - -If you are using Expo, you are done. Otherwise, continue to the next steps. - -To complete the linking on iOS, make sure you have [Cocoapods](https://cocoapods.org/) installed. Then run: - -```sh -cd ios -pod install -cd .. -``` - -**IMPORTANT:** There are additional steps required for `react-native-gesture-handler` on Android after linking (for all React Native versions). Check the [this guide](https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html) to complete the installation. - -## Usage - -```js -import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs'; - -const MaterialTopTabs = createMaterialTopTabNavigator(); - -export default function App() { - return ( - - - - - - ); -} -``` +Installation instructions and documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/material-top-tab-navigator.html). diff --git a/packages/material-top-tabs/package.json b/packages/material-top-tabs/package.json index b70599e2..fc0da85c 100644 --- a/packages/material-top-tabs/package.json +++ b/packages/material-top-tabs/package.json @@ -1,6 +1,7 @@ { "name": "@react-navigation/material-top-tabs", "description": "Integration for the animated tab view component from react-native-tab-view", + "version": "5.0.0-alpha.38", "keywords": [ "react-native-component", "react-component", @@ -11,9 +12,12 @@ "material", "tab" ], - "version": "5.0.0-alpha.41", "license": "MIT", - "repository": "https://github.com/react-navigation/navigation-ex/tree/master/packages/material-top-tabs", + "repository": "https://github.com/react-navigation/react-navigation/tree/master/packages/material-top-tabs", + "bugs": { + "url": "https://github.com/react-navigation/react-navigation/issues" + }, + "homepage": "https://reactnavigation.org/docs/material-top-tab-navigator.html", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", "module": "lib/module/index.js", @@ -47,7 +51,7 @@ "typescript": "^3.7.4" }, "peerDependencies": { - "@react-navigation/native": "^5.0.0-alpha.0", + "@react-navigation/native": "^5.0.0", "react": "*", "react-native": "*", "react-native-gesture-handler": "^1.0.0", diff --git a/packages/native-stack/README.md b/packages/native-stack/README.md index 2903685d..8e5fa429 100644 --- a/packages/native-stack/README.md +++ b/packages/native-stack/README.md @@ -2,83 +2,4 @@ Stack navigator for React Native using native primitives for navigation. Uses [`react-native-screens`](https://github.com/kmagiera/react-native-screens) under the hood. -Documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/en/next/native-stack-navigator.html). - -Expo SDK 35 and lower is not supported as it includes an older version of `react-native-screens`. - -## Installation - -Open a Terminal in your project's folder and run, - -```sh -yarn add @react-navigation/native @react-navigation/native-stack -``` -Or with npm - -```sh -npm install --save @react-navigation/native @react-navigation/native-stack -``` - -If you are using Expo, to ensure that you get the compatible versions of the libraries, run: - -```sh -expo install react-native-screens -``` - -If you are not using Expo, run the following: - -```sh -yarn add react-native-screens -``` -Or with npm - -```sh -npm install --save react-native-screens -``` - -If you are using Expo, you are done. Otherwise, continue to the next steps. - -To complete the linking on iOS, make sure you have [Cocoapods](https://cocoapods.org/) installed. Then run: - -```sh -cd ios -pod install -cd .. -``` - -To finalize installation of `react-native-screens` for Android, add the following two lines to dependencies section in `android/app/build.gradle`: - -```gradle -implementation 'androidx.appcompat:appcompat:1.1.0-rc01' -implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02' -``` - -Make sure to enable `react-native-screens`. This needs to be done before our app renders. To do it, add the following code in your entry file (e.g. `App.js`): - -```js -import { enableScreens } from 'react-native-screens'; - -enableScreens(); -``` - -## Usage - -```js -import { createNativeStackNavigator } from '@react-navigation/native-stack'; - -const Stack = createNativeStackNavigator(); - -export default function App() { - return ( - - - - - - ); -} -``` +Installation instructions and documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/native-stack-navigator.html). diff --git a/packages/native-stack/package.json b/packages/native-stack/package.json index 1a53de54..f0a281ea 100644 --- a/packages/native-stack/package.json +++ b/packages/native-stack/package.json @@ -1,14 +1,18 @@ { "name": "@react-navigation/native-stack", "description": "Native stack navigator component for iOS and Android", + "version": "5.0.0-alpha.32", "keywords": [ "react", "react-native", "react-navigation" ], - "version": "5.0.0-alpha.35", "license": "MIT", - "repository": "https://github.com/react-navigation/navigation-ex/tree/master/packages/native-stack", + "repository": "https://github.com/react-navigation/react-navigation/tree/master/packages/native-stack", + "bugs": { + "url": "https://github.com/react-navigation/react-navigation/issues" + }, + "homepage": "https://reactnavigation.org/docs/native-stack-navigator.html", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", "module": "lib/module/index.js", @@ -35,7 +39,7 @@ "typescript": "^3.7.4" }, "peerDependencies": { - "@react-navigation/native": "^5.0.0-alpha.0", + "@react-navigation/native": "^5.0.0", "react": "*", "react-native": "*", "react-native-screens": "^2.0.0-alpha.33" diff --git a/packages/native/README.md b/packages/native/README.md index 9ecb9da7..8912858c 100644 --- a/packages/native/README.md +++ b/packages/native/README.md @@ -2,49 +2,4 @@ React Native integration for React Navigation. -Documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/en/next/getting-started.html). - -## Installation - -Open a Terminal in your project's folder and run, - -```sh -yarn add @react-navigation/native -``` - -## Usage - -```js -const ref = React.useRef(); - -useBackButton(ref); - -const { getInitialState } = useLinking(ref, { - prefixes: ['https://myapp.com', 'myapp://'], -}); - -const [isReady, setIsReady] = React.useState(false); -const [initialState, setInitialState] = React.useState(); - -React.useEffect(() => { - getInitialState() - .catch(() => {}) - .then(state => { - if (state !== undefined) { - setInitialState(state); - } - - setIsReady(true); - }); -}, [getInitialState]); - -if (!isReady) { - return null; -} - -return ( - - {/* content */} - -); -``` +Installation instructions and documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/getting-started.html). diff --git a/packages/native/package.json b/packages/native/package.json index 1686b786..06c258fa 100644 --- a/packages/native/package.json +++ b/packages/native/package.json @@ -1,15 +1,19 @@ { "name": "@react-navigation/native", "description": "React Native integration for React Navigation", + "version": "5.0.0-alpha.32", "keywords": [ "react-native", "react-navigation", "ios", "android" ], - "version": "5.0.0-alpha.35", "license": "MIT", - "repository": "https://github.com/react-navigation/navigation-ex/tree/master/packages/native", + "repository": "https://github.com/react-navigation/react-navigation/tree/master/packages/native", + "bugs": { + "url": "https://github.com/react-navigation/react-navigation/issues" + }, + "homepage": "https://reactnavigation.org", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", "module": "lib/module/index.js", diff --git a/packages/routers/README.md b/packages/routers/README.md index a6a94d60..3844eadd 100644 --- a/packages/routers/README.md +++ b/packages/routers/README.md @@ -14,27 +14,4 @@ yarn add @react-navigation/routers ## Usage -A basic custom navigator bundling a router and a view looks like this: - -```js -import { createNavigatorFactory, useNavigationBuilder } from '@react-navigation/native'; -import { StackRouter } from '@react-navigation/routers'; - -function StackNavigator({ initialRouteName, children, ...rest }) { - const { state, navigation, descriptors } = useNavigationBuilder(StackRouter, { - initialRouteName, - children, - }); - - return ( - - ); -} - -export default createNavigatorFactory(StackNavigator); -``` +Documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/custom-routers.html). diff --git a/packages/routers/package.json b/packages/routers/package.json index 702f1b18..3e9e6d1f 100644 --- a/packages/routers/package.json +++ b/packages/routers/package.json @@ -1,14 +1,18 @@ { "name": "@react-navigation/routers", "description": "Routers to help build custom navigators", + "version": "5.0.0-alpha.30", "keywords": [ "react", "react-native", "react-navigation" ], - "version": "5.0.0-alpha.33", "license": "MIT", - "repository": "https://github.com/react-navigation/navigation-ex/tree/master/packages/routers", + "repository": "https://github.com/react-navigation/react-navigation/tree/master/packages/routers", + "bugs": { + "url": "https://github.com/react-navigation/react-navigation/issues" + }, + "homepage": "https://reactnavigation.org/docs/custom-routers.html", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", "module": "lib/module/index.js", diff --git a/packages/stack/README.md b/packages/stack/README.md index a5d14263..0eff4f31 100644 --- a/packages/stack/README.md +++ b/packages/stack/README.md @@ -2,67 +2,4 @@ Stack navigator for React Navigation. -Documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/en/next/stack-navigator.html). - -## Installation - -Open a Terminal in your project's folder and run, - -```sh -yarn add @react-navigation/native @react-navigation/stack @react-native-community/masked-view -``` - -Now we need to install [`react-native-gesture-handler`](https://github.com/kmagiera/react-native-gesture-handler), [`react-native-screens`](https://github.com/kmagiera/react-native-screens) and [`react-native-safe-area-context`](https://github.com/th3rdwave/react-native-safe-area-context). - -If you are using Expo, to ensure that you get the compatible versions of the libraries, run: - -```sh -expo install react-native-gesture-handler react-native-screens react-native-safe-area-context -``` - -If you are not using Expo, run the following: - -```sh -yarn add react-native-gesture-handler react-native-screens react-native-safe-area-context -``` - -If you are using Expo, you are done. Otherwise, continue to the next steps. - -To complete the linking on iOS, make sure you have [Cocoapods](https://cocoapods.org/) installed. Then run: - -```sh -cd ios -pod install -cd .. -``` - -To finalize installation of `react-native-screens` for Android, add the following two lines to dependencies section in `android/app/build.gradle`: - -```gradle -implementation 'androidx.appcompat:appcompat:1.1.0-rc01' -implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02' -``` - -**IMPORTANT:** There are additional steps required for `react-native-gesture-handler` on Android after linking (for all React Native versions). Check the [this guide](https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html) to complete the installation. - -## Usage - -```js -import { createStackNavigator } from '@react-navigation/stack'; - -const Stack = createStackNavigator(); - -export default function App() { - return ( - - - - - - ); -} -``` +Installation instructions and documentation can be found on the [React Navigation website](https://reactnavigation.org/docs/stack-navigator.html). diff --git a/packages/stack/package.json b/packages/stack/package.json index efb09284..c7d0dc70 100644 --- a/packages/stack/package.json +++ b/packages/stack/package.json @@ -1,6 +1,7 @@ { "name": "@react-navigation/stack", "description": "Stack navigator component for iOS and Android with animated transitions and gestures", + "version": "5.0.0-alpha.66", "keywords": [ "react-native-component", "react-component", @@ -10,9 +11,12 @@ "android", "stack" ], - "version": "5.0.0-alpha.71", "license": "MIT", - "repository": "https://github.com/react-navigation/navigation-ex/tree/master/packages/stack", + "repository": "https://github.com/react-navigation/react-navigation/tree/master/packages/stack", + "bugs": { + "url": "https://github.com/react-navigation/react-navigation/issues" + }, + "homepage": "https://reactnavigation.org/docs/stack-navigator.html", "main": "lib/commonjs/index.js", "react-native": "src/index.tsx", "module": "lib/module/index.js", @@ -50,7 +54,7 @@ }, "peerDependencies": { "@react-native-community/masked-view": "^0.1.1", - "@react-navigation/native": "^5.0.0-alpha.0", + "@react-navigation/native": "^5.0.0", "react": "*", "react-native": "*", "react-native-gesture-handler": "^1.0.0", diff --git a/packages/stack/src/views/SafeAreaProviderCompat.tsx b/packages/stack/src/views/SafeAreaProviderCompat.tsx index 2088a12e..f6030610 100644 --- a/packages/stack/src/views/SafeAreaProviderCompat.tsx +++ b/packages/stack/src/views/SafeAreaProviderCompat.tsx @@ -26,7 +26,7 @@ export default function SafeAreaProviderCompat({ children }: Props) { if (insets) { // If we already have insets, don't wrap the stack in another safe area provider // This avoids an issue with updates at the cost of potentially incorrect values - // https://github.com/react-navigation/navigation-ex/issues/174 + // https://github.com/react-navigation/react-navigation/issues/174 return children; }