Skip to content

Commit 0e004c7

Browse files
committed
Fix markdown lint errors
1 parent 7f32cfa commit 0e004c7

27 files changed

+84
-81
lines changed

.markdownlint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ MD013: false
55

66
# Disable checks for inline HTML
77
MD033: false
8+
9+
# Descriptive link text
10+
MD059: false

versioned_docs/version-5.x/compatibility.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The library exports the following APIs:
5656
- `createCompatNavigatorFactory` - Takes a navigator with the v5 API and returns a `createXNavigator` with the v4 API.
5757
- `createCompatNavigationProp` - Takes the v5 `navigation` object along with a `route` object and returns a v4 `navigation` object.
5858

59-
### What does it handle?
59+
## What does it handle?
6060

6161
The compatibility layer handles various API differences between React Navigation 4 and 5:
6262

@@ -65,7 +65,7 @@ The compatibility layer handles various API differences between React Navigation
6565
- Add support for `screenProps` which is removed in v5.
6666
- Export action creators such as `NavigationActions`, `StackActions`, `SwitchActions` with same signature as v4.
6767

68-
### What doesn't it handle?
68+
## What doesn't it handle?
6969

7070
Due to the dynamic API of React Navigation 5, some functionality possible with the static API of v4 are not possible anymore, and hence the compatibility layer doesn't handle them:
7171

@@ -78,7 +78,7 @@ Due to the dynamic API of React Navigation 5, some functionality possible with t
7878

7979
While we have tried our best to make the compatibility layer handle most of the differences, there might be something missing. So make sure to test the code that you've migrated.
8080

81-
### Why should we use it?
81+
## Why should we use it?
8282

8383
Using the compatibility layer allows us to migrate our code to the new version incrementally. Unfortunately we do have to change some code to get the compatibility layer working (see "What doesn't it handle") properly, but it still allows majority of our code to remain unchanged. Some of the advantages of using the compatibility layer include:
8484

versioned_docs/version-5.x/custom-android-back-button-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ The presented approach will work well for screens that are shown in a `StackNavi
4242

4343
If instead of overriding system back button, you'd like to prevent going back from the screen, see docs for [preventing going back](preventing-going-back.md).
4444

45-
### Why not use component lifecycle methods
45+
## Why not use component lifecycle methods
4646

4747
At first, you may be inclined to use `componentDidMount` to subscribe for the back press event and `componentWillUnmount` to unsubscribe, or use `useEffect` to add the listener. This approach will not work - learn more about this in [navigation lifecycle](navigation-lifecycle.md).

versioned_docs/version-5.x/drawer-actions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar_label: DrawerActions
88

99
The following actions are supported:
1010

11-
### openDrawer
11+
## openDrawer
1212

1313
The `openDrawer` action can be used to open the drawer pane.
1414

@@ -20,7 +20,7 @@ import { DrawerActions } from '@react-navigation/native';
2020
navigation.dispatch(DrawerActions.openDrawer());
2121
```
2222

23-
### closeDrawer
23+
## closeDrawer
2424

2525
The `closeDrawer` action can be used to close the drawer pane.
2626

@@ -32,7 +32,7 @@ import { DrawerActions } from '@react-navigation/native';
3232
navigation.dispatch(DrawerActions.closeDrawer());
3333
```
3434

35-
### toggleDrawer
35+
## toggleDrawer
3636

3737
The `toggleDrawer` action can be used to open the drawer pane if closed, or close if open.
3838

@@ -44,7 +44,7 @@ import { DrawerActions } from '@react-navigation/native';
4444
navigation.dispatch(DrawerActions.toggleDrawer());
4545
```
4646

47-
### jumpTo
47+
## jumpTo
4848

4949
The `jumpTo` action can be used to jump to an existing route in the drawer navigator.
5050

versioned_docs/version-5.x/navigation-events.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Each callback registered as an event listener receive an event object as its arg
2323

2424
There are 2 ways to listen to events:
2525

26-
### `navigation.addListener`
26+
## `navigation.addListener`
2727

2828
Inside a screen, you can add listeners on the `navigation` prop with the `addListener` method. The `addListener` method takes 2 arguments: type of the event, and a callback to be called on the event. It returns a function that can be called to unsubscribe from the event.
2929

@@ -78,7 +78,7 @@ class Profile extends React.Component {
7878

7979
One thing to keep in mind is that you can only listen to events from the immediate navigator with `addListener`. For example, if you try to add a listener in a screen that's inside a stack that's nested in a tab, it won't get the `tabPress` event. If you need to listen to an event from a parent navigator, you may use `navigation.getParent()` to get a reference to parent navigator's navigation prop and add a listener.
8080

81-
### `listeners` prop on `Screen`
81+
## `listeners` prop on `Screen`
8282

8383
Sometimes you might want to add a listener from the component where you defined the navigator rather than inside the screen. You can use the `listeners` prop on the `Screen` component to add listeners. The `listeners` prop takes an object with the event names as keys and the listener callbacks as values.
8484

versioned_docs/version-5.x/navigation-prop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ It's important to highlight the `navigation` prop is _not_ passed in to _all_ co
2424

2525
> `setParams`/`setOptions` etc. should only be called in `useEffect`/`useLayoutEffect`/`componentDidMount`/`componentDidUpdate` etc. Not during render or in constructor.
2626
27-
### Navigator-dependent functions
27+
## Navigator-dependent functions
2828

2929
There are several additional functions present on `navigation` prop based on the kind of the current navigator.
3030

versioned_docs/version-5.x/redux-integration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function App() {
2222

2323
Notice that we wrap our components in a `Provider` like we'd normally do with `react-redux`. Ta da! Now feel free to use `connect` throughout your app.
2424

25-
### Use a component that is `connect`ed in `options`
25+
## Use a component that is `connect`ed in `options`
2626

2727
Create a component, `connect` it to the store, then use that component in the `title`.
2828

@@ -44,7 +44,7 @@ const CounterContainer = connect((state) => ({ value: state.count }))(Counter);
4444
/>
4545
```
4646

47-
### Pass the state you care about as a param to the screen
47+
## Pass the state you care about as a param to the screen
4848

4949
If the value isn't expected to change, you can just pass it from a connected component to the other screen as a param.
5050

versioned_docs/version-5.x/screen-options.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ In the [configuring the header bar](headers.md) section of the fundamentals docu
1010

1111
There are 3 ways of specifying options for screens:
1212

13-
### `options` prop on `Screen`
13+
## `options` prop on `Screen`
1414

1515
You can pass a prop named `options` to the `Screen` component to configure a screen, where you can specify an object with different options for that screen:
1616

@@ -46,7 +46,7 @@ You can also pass a function to `options`. The function will receive the [`navig
4646
/>
4747
```
4848

49-
### `screenOptions` prop on the navigator
49+
## `screenOptions` prop on the navigator
5050

5151
You can pass a prop named `screenOptions` to the navigator component, where you can specify an object with different options. The options specified in `screenOptions` apply to all of the screens in the navigator. So this is a good place to add options that will apply to all screens within the navigator.
5252

@@ -87,7 +87,7 @@ Similar to `options`, you can also pass a function to `screenOptions`. The funct
8787
</Tab.Navigator>
8888
```
8989

90-
### `navigation.setOptions` method
90+
## `navigation.setOptions` method
9191

9292
The `navigation` prop has a `setOptions` method that lets you update the options for a screen from within a component. See [navigation prop's docs](navigation-prop.md#setoptions) more details.
9393

versioned_docs/version-5.x/stack-actions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar_label: StackActions
88

99
The following actions are supported:
1010

11-
### replace
11+
## replace
1212

1313
The `replace` action allows to replace a route in the [navigation state](navigation-state.md). It takes the following arguments:
1414

@@ -45,7 +45,7 @@ navigation.dispatch({
4545

4646
If the `source` property is explicitly set to `undefined`, it'll replace the focused route.
4747

48-
### push
48+
## push
4949

5050
The `push` action adds a route on top of the stack and navigates forward to it. This differs from `navigate` in that `navigate` will pop back to earlier in the stack if a route of the given name is already present there. `push` will always add on top, so a route can be present multiple times.
5151

@@ -62,7 +62,7 @@ const pushAction = StackActions.push('Profile', { user: 'Wojtek' });
6262
navigation.dispatch(pushAction);
6363
```
6464

65-
### pop
65+
## pop
6666

6767
The `pop` action takes you back to a previous screen in the stack. It takes one optional argument (`count`), which allows you to specify how many screens to pop back by.
6868

@@ -76,7 +76,7 @@ const popAction = StackActions.pop(1);
7676
navigation.dispatch(popAction);
7777
```
7878

79-
### popToTop
79+
## popToTop
8080

8181
The `popToTop` action takes you back to the first screen in the stack, dismissing all the others. It's functionally identical to `StackActions.pop({n: currentIndex})`.
8282

versioned_docs/version-5.x/tab-actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar_label: TabActions
88

99
The following actions are supported:
1010

11-
### jumpTo
11+
## jumpTo
1212

1313
The `jumpTo` action can be used to jump to an existing route in the tab navigator.
1414

0 commit comments

Comments
 (0)