Skip to content

Commit da136b0

Browse files
michizhousatya164
authored andcommitted
Fixed typos and errors in documentation (react-navigation#556)
1 parent 091fd15 commit da136b0

File tree

13 files changed

+20
-20
lines changed

13 files changed

+20
-20
lines changed

docs/community-libraries-and-navigators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The library implements a custom navigator called `FluidNavigator` that makes all
2626

2727
react-navigation-collapsible is a library and a `Higher Order Component` that adjusts your screen options and makes your screen header collapsible.
2828

29-
Since react-navigation's header is designed as `Animated` component. You can animate the header by passing `Animated.Value` from your `ScrollView` or `FlatList` to the header.
29+
Since react-navigation's header is designed as `Animated` component, you can animate the header by passing `Animated.Value` from your `ScrollView` or `FlatList` to the header.
3030

3131
#### Links
3232

docs/compatibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Due to the dynamic API of React Navigation 5, some functionality possible with t
7272
- It doesn't wrap navigator's props or options. This basically means that the options you're passing to a navigator might be a bit different as per breaking changes in the navigators.
7373
- Legacy deep link support by defining `path` in route configuration is not supported.
7474
- Navigating to a navigator doesn't work the same, i.e. we can't navigate to a screen in a navigator that's not rendered already, and params aren't merged to all child screens.
75-
- Some methods such as the legacy `reset` method which take an array of actions isn't supported anymore. Unsupported methods will throw errors when using them as well as give type errors if we're using TypeScript.
75+
- Some methods such as the legacy `reset` method which take an array of actions aren't supported anymore. Unsupported methods will throw errors when using them as well as give type errors if we're using TypeScript.
7676
- It doesn't export `createAppContainer`, so you'll need to use the v5 API for the container (`NavigationNativeContainer`). This also means any features supported by the container need to be migrated to the new API.
7777
- If you're using advanced APIs like Redux integration, custom routers and actions etc., they aren't supported.
7878

docs/connecting-navigation-prop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_label: Access the navigation prop from any component
66

77
[`useNavigation`](use-navigation.md) is a a hook which gives access to the `navigation` object. It's useful when you cannot pass the `navigation` prop into the component directly, or don't want to pass it in case of a deeply nested child.
88

9-
An ordinary component that is not a screen component will not receive the navigation prop automatically. for example in this `MyBackButton` component:
9+
An ordinary component that is not a screen component will not receive the navigation prop automatically. For example in this `MyBackButton` component:
1010

1111
```js
1212
import * as React from 'react';
@@ -27,7 +27,7 @@ export function MyBackButton({ navigation }) {
2727

2828
To resolve this exception, you could pass the `navigation` prop in to `MyBackButton` when you render it from a screen, like so: `<MyBackButton navigation={props.navigation} />`.
2929

30-
Alternatively, you can use the `useNavigation` to provide the `navigation` automatically automatically (through React context, if you're curious).
30+
Alternatively, you can use the `useNavigation` to provide the `navigation` prop automatically (through React context, if you're curious).
3131

3232
```js
3333
import * as React from 'react';

docs/custom-navigators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The hook returns an object with following properties:
4343

4444
- `state` - The navigation state for the navigator. The component can take this state and decide how to render it.
4545
- `navigation` - The navigation object containing various helper methods for the navigator to manipulate the navigation state. This isn't the same as the navigation object for the screen and includes some helpers such as `emit` to emit events to the screens.
46-
- `descriptors` - This is an object containing descriptors for each route with the route keys as it's properties. The descriptor for a route can be accessed by `descriptors[route.key]`. Each descriptor contains the following properties:
46+
- `descriptors` - This is an object containing descriptors for each route with the route keys as its properties. The descriptor for a route can be accessed by `descriptors[route.key]`. Each descriptor contains the following properties:
4747

4848
- `navigation` - The navigation prop for the screen. You don't need to pass this to the screen manually. But it's useful if we're rendering components outside the screen that need to receive `navigation` prop as well, such as a header component.
4949
- `options` - A getter which returns the options such as `title` for the screen if they are specified.

docs/deep-linking.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ This will result in something like:
133133
}
134134
```
135135

136-
If this doesn't satisfy your use case, The hook also accepts a `getStateFromPath` option where you can provide a custom function to convert the URL to a valid state object for more advanced use cases.
136+
If this doesn't satisfy your use case, the hook also accepts a `getStateFromPath` option where you can provide a custom function to convert the URL to a valid state object for more advanced use cases.
137137

138138
## Set up with Expo projects
139139

140-
First, you will want to specify a url scheme for your app. This corresponds to the string before `://` in a url, so if your scheme is `mychat` then a link to your app would be `mychat://`. The scheme only applies to standalone apps and you need to re-build the standalone app for the change to take effect. In the Expo client app you can deep link using `exp://ADDRESS:PORT` where `ADDRESS` is often `127.0.0.1` and `PORT` is often `19000` - the URL is printed when you run `expo start`. If you want to test with your custom scheme you will need to run `expo build:ios -t simulator` or `expo build:android` and install the resulting binaries in your emulators. You can register for a scheme in your `app.json` by adding a string under the scheme key:
140+
First, you will want to specify a URL scheme for your app. This corresponds to the string before `://` in a URL, so if your scheme is `mychat` then a link to your app would be `mychat://`. The scheme only applies to standalone apps and you need to re-build the standalone app for the change to take effect. In the Expo client app you can deep link using `exp://ADDRESS:PORT` where `ADDRESS` is often `127.0.0.1` and `PORT` is often `19000` - the URL is printed when you run `expo start`. If you want to test with your custom scheme you will need to run `expo build:ios -t simulator` or `expo build:android` and install the resulting binaries in your emulators. You can register for a scheme in your `app.json` by adding a string under the scheme key:
141141

142142
```json
143143
{
@@ -238,7 +238,7 @@ In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
238238
}
239239
```
240240

241-
In Xcode, open the project at `SimpleApp/ios/SimpleApp.xcodeproj`. Select the project in sidebar and navigate to the info tab. Scroll down to "URL Types" and add one. In the new URL type, set the identifier and the url scheme to your desired url scheme.
241+
In Xcode, open the project at `SimpleApp/ios/SimpleApp.xcodeproj`. Select the project in sidebar and navigate to the info tab. Scroll down to "URL Types" and add one. In the new URL type, set the identifier and the URL scheme to your desired URL scheme.
242242

243243
![Xcode project info URL types with mychat added](/docs/assets/deep-linking/xcode-linking.png)
244244

@@ -260,7 +260,7 @@ To test the URI on a real device, open Safari and type `mychat://chat/jane`.
260260

261261
To configure the external linking in Android, you can create a new intent in the manifest.
262262

263-
In `SimpleApp/android/app/src/main/AndroidManifest.xml`, do these followings adjustments:
263+
In `SimpleApp/android/app/src/main/AndroidManifest.xml`, do these following adjustments:
264264

265265
1. Set `launchMode` of `MainActivity` to `singleTask` in order to receive intent on existing `MainActivity`. It is useful if you want to perform navigation using deep link you have been registered - [details](http://developer.android.com/training/app-indexing/deep-linking.html#adding-filters)
266266
2. Add the new `intent-filter` inside the `MainActivity` entry with a `VIEW` type action:

docs/drawer-navigator.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Allows for defining how far from the edge of the content view the swipe gesture
127127

128128
#### `hideStatusBar`
129129

130-
When set to true Drawer component will hide the OS status bar whenever the drawer is pulled or when its in an "open" state.
130+
When set to true Drawer component will hide the OS status bar whenever the drawer is pulled or when it's in an "open" state.
131131

132132
#### `statusBarAnimation`
133133

@@ -264,8 +264,8 @@ The `DrawerItem` component accepts the following props:
264264
- `onPress` (required): Function to execute on press.
265265
- `activeTintColor`: Color for the icon and label when the item is active.
266266
- `inactiveTintColor`: Color for the icon and label when the item is inactive.
267-
- `activeBackgroundColor`: Background color for item when its active.
268-
- `inactiveBackgroundColor`: Background color for item when its inactive.
267+
- `activeBackgroundColor`: Background color for item when it's active.
268+
- `inactiveBackgroundColor`: Background color for item when it's inactive.
269269
- `labelStyle`: Style object for the label `Text`.
270270
- `style`: Style object for the wrapper `View`.
271271

website/versioned_docs/version-1.x/deep-linking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
116116
}
117117
```
118118

119-
In Xcode, open the project at `SimpleApp/ios/SimpleApp.xcodeproj`. Select the project in sidebar and navigate to the info tab. Scroll down to "URL Types" and add one. In the new URL type, set the identifier and the url scheme to your desired url scheme.
119+
In Xcode, open the project at `SimpleApp/ios/SimpleApp.xcodeproj`. Select the project in sidebar and navigate to the info tab. Scroll down to "URL Types" and add one. In the new URL type, set the identifier and the URL scheme to your desired URL scheme.
120120

121121
![Xcode project info URL types with mychat added](/docs/assets/deep-linking/xcode-linking.png)
122122

website/versioned_docs/version-2.x/community-libraries-and-navigators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The library implements a custom navigator called `FluidNavigator` that makes all
2525

2626
react-navigation-collapsible is a library and a `Higher Order Component` that adjusts your navigationOptions and makes your screen header collapsible.
2727

28-
Since react-navigation's header is designed as `Animated` component. You can animate the header by passing `Animated.Value` from your `ScrollView` or `FlatList` to the header.
28+
Since react-navigation's header is designed as `Animated` component, you can animate the header by passing `Animated.Value` from your `ScrollView` or `FlatList` to the header.
2929

3030
#### Links
3131

website/versioned_docs/version-2.x/deep-linking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
116116
}
117117
```
118118

119-
In Xcode, open the project at `SimpleApp/ios/SimpleApp.xcodeproj`. Select the project in sidebar and navigate to the info tab. Scroll down to "URL Types" and add one. In the new URL type, set the identifier and the url scheme to your desired url scheme.
119+
In Xcode, open the project at `SimpleApp/ios/SimpleApp.xcodeproj`. Select the project in sidebar and navigate to the info tab. Scroll down to "URL Types" and add one. In the new URL type, set the identifier and the URL scheme to your desired URL scheme.
120120

121121
![Xcode project info URL types with mychat added](/docs/assets/deep-linking/xcode-linking.png)
122122

website/versioned_docs/version-3.x/deep-linking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
145145
}
146146
```
147147

148-
In Xcode, open the project at `SimpleApp/ios/SimpleApp.xcodeproj`. Select the project in sidebar and navigate to the info tab. Scroll down to "URL Types" and add one. In the new URL type, set the identifier and the url scheme to your desired url scheme.
148+
In Xcode, open the project at `SimpleApp/ios/SimpleApp.xcodeproj`. Select the project in sidebar and navigate to the info tab. Scroll down to "URL Types" and add one. In the new URL type, set the identifier and the URL scheme to your desired URL scheme.
149149

150150
![Xcode project info URL types with mychat added](/docs/assets/deep-linking/xcode-linking.png)
151151

0 commit comments

Comments
 (0)