You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: versioned_docs/version-5.x/devtools.md
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ sidebar_label: Developer tools
6
6
7
7
Developer tools to make debugging easier when using React Navigation.
8
8
9
-
To configure the developer tools, install [`@react-navigation/devtools`](https://github.com/react-navigation/react-navigation/tree/master/packages/devtools):
9
+
To use the developer tools, install [`@react-navigation/devtools`](https://github.com/react-navigation/react-navigation/tree/master/packages/devtools):
10
10
11
11
```bash npm2yarn
12
12
npm install @react-navigation/devtools
@@ -18,19 +18,19 @@ The package exposes the following APIs:
18
18
19
19
### `useReduxDevToolsExtension`
20
20
21
-
This hook provides integration with [Redux DevTools Extension](https://github.com/zalmoxisus/redux-devtools-extension).It also works with [`React Native Debugger app`](https://github.com/jhen0409/react-native-debugger) which includes this extension.
21
+
This hook provides integration with [Redux DevTools Extension](https://github.com/zalmoxisus/redux-devtools-extension).It also works with [`React Native Debugger app`](https://github.com/jhen0409/react-native-debugger) which includes this extension.
22
22
23
-
The hook accepts a `ref` to the `NavigationContainer` as its argument.
23
+
**Usage:**
24
24
25
-
Usage:
25
+
To use the hook, import it and pass a `ref` to the `NavigationContainer` as its argument:
Copy file name to clipboardExpand all lines: versioned_docs/version-6.x/devtools.md
+52-5Lines changed: 52 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -6,23 +6,70 @@ sidebar_label: Developer tools
6
6
7
7
Developer tools to make debugging easier when using React Navigation.
8
8
9
-
To configure the developer tools, install [`@react-navigation/devtools`](https://github.com/react-navigation/react-navigation/tree/master/packages/devtools):
9
+
To use the developer tools, install [`@react-navigation/devtools`](https://github.com/react-navigation/react-navigation/tree/master/packages/devtools):
10
10
11
11
```bash npm2yarn
12
12
npm install @react-navigation/devtools@next
13
13
```
14
14
15
+
Hooks from this package only work during development and are disabled in production. You don't need to do anything special to remove them from the production build.
16
+
15
17
## API Definition
16
18
17
19
The package exposes the following APIs:
18
20
21
+
### `useFlipper`
22
+
23
+
This hook provides integration with [Flipper](https://fbflipper.com/) for React Native apps.
24
+
25
+
> This doesn't work in Expo managed apps since they don't support Flipper.
26
+
27
+
To be able to use this hook, you need to:
28
+
29
+
-[Configure Flipper in your React Native app](https://fbflipper.com/docs/features/react-native/) if it's not configured already
30
+
- Install the `react-native-flipper` package in your app:
31
+
32
+
```bash npm2yarn
33
+
npm install --save-dev react-native-flipper
34
+
```
35
+
36
+
- Install the `react-navigation` plugin in the Flipper app
This hook provides integration with [Redux DevTools Extension](https://github.com/zalmoxisus/redux-devtools-extension).It also works with [`React Native Debugger app`](https://github.com/jhen0409/react-native-debugger) which includes this extension.
68
+
This hook provides integration with [Redux DevTools Extension](https://github.com/zalmoxisus/redux-devtools-extension).It also works with [`React Native Debugger app`](https://github.com/jhen0409/react-native-debugger) which includes this extension.
22
69
23
-
The hook accepts a `ref` to the `NavigationContainer` as its argument.
70
+
**Usage:**
24
71
25
-
Usage:
72
+
To use the hook, import it and pass a `ref` to the `NavigationContainer` as its argument:
26
73
27
74
```js
28
75
import*asReactfrom'react';
@@ -40,4 +87,4 @@ export default function App() {
40
87
}
41
88
```
42
89
43
-
The hook only works during development and is disabled in production. You don't need to do anything special to remove it from the production build.
90
+
Now, you'll be able to see logs from React Navigation in Redux DevTools Extension, e.g. when you're debugging your app with React Native Debugger app.
0 commit comments