Skip to content

Commit 9b8820b

Browse files
committed
docs: reorganize README
1 parent 3614325 commit 9b8820b

File tree

1 file changed

+43
-27
lines changed

1 file changed

+43
-27
lines changed

README.md

Lines changed: 43 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@
44

55
![rn-perf-monitor](https://user-images.githubusercontent.com/4534323/151138734-dc9af3b1-1e96-4416-8abd-346597a4dbe8.gif)
66

7+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
8+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
9+
10+
- [Usage](#usage)
11+
- [Install](#install)
12+
- [Flipper](#flipper)
13+
- [Install for non-Expo projects](#install-for-non-expo-projects)
14+
- [iOS](#ios)
15+
- [Android](#android)
16+
- [Migrating from flipper-plugin-rn-performance-android](#migrating-from-flipper-plugin-rn-performance-android)
17+
- [Install for Expo projects](#install-for-expo-projects)
18+
- [Best practice](#best-practice)
19+
- [Contributing](#contributing-to-flipper-desktop)
20+
21+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
22+
723
## Usage
824

925
[Here's a detailed article](https://blog.bam.tech/developer-news/measuring-and-improving-performance-on-a-react-native-app) to go further
@@ -27,7 +43,7 @@ Note that:
2743

2844
Search for `rn-perf-monitor` in the list of plugins.
2945

30-
### Install Android/iOS plugin
46+
### Install for non-Expo projects
3147

3248
Install the plugin
3349

@@ -101,7 +117,32 @@ import tech.bam.rnperformance.flipper.RNPerfMonitorPlugin;
101117
client.addPlugin(new RNPerfMonitorPlugin());
102118
```
103119

104-
## Usage with Expo
120+
#### Migrating from flipper-plugin-rn-performance-android
121+
122+
You might have previously installed `flipper-plugin-rn-performance-android`. This is now deprecated, as `react-native-flipper-performance-plugin` has autolinking and cross-platform support.
123+
124+
You also need to run these steps:
125+
126+
Uninstall the package:
127+
128+
```
129+
yarn remove flipper-plugin-rn-performance-android
130+
```
131+
132+
Then **remove** those lines in `./android/settings.gradle`:
133+
134+
```gradle
135+
include ':flipper-plugin-rn-performance-android'
136+
project(':flipper-plugin-rn-performance-android').projectDir = new File(rootProject.projectDir, '../node_modules/flipper-plugin-rn-performance-android')
137+
```
138+
139+
and in `./android/app/build.gradle`:
140+
141+
```gradle
142+
debugImplementation project(':flipper-plugin-rn-performance-android')
143+
```
144+
145+
### Install for Expo projects
105146

106147
1. This plugin does not work with Expo Go, since it adds native code. You can use an Expo [custom-dev-client](https://docs.expo.dev/development/getting-started/) instead.
107148

@@ -151,31 +192,6 @@ if (__DEV__) {
151192

152193
With DevTools you can easily determine why your app is taking too much time for a particular task, most importantly you can find out if you are re-rendering too often. Especially with lists, this can quickly become a knitting trap. Optimize your code and measure the FPS afterwards to get a decent score.
153194

154-
#### Migrating from flipper-plugin-rn-performance-android
155-
156-
You might have previously installed `flipper-plugin-rn-performance-android`. This is now deprecated, as `react-native-flipper-performance-plugin` has autolinking and cross-platform support.
157-
158-
You also need to run these steps:
159-
160-
Uninstall the package:
161-
162-
```
163-
yarn remove flipper-plugin-rn-performance-android
164-
```
165-
166-
Then **remove** those lines in `./android/settings.gradle`:
167-
168-
```gradle
169-
include ':flipper-plugin-rn-performance-android'
170-
project(':flipper-plugin-rn-performance-android').projectDir = new File(rootProject.projectDir, '../node_modules/flipper-plugin-rn-performance-android')
171-
```
172-
173-
and in `./android/app/build.gradle`:
174-
175-
```gradle
176-
debugImplementation project(':flipper-plugin-rn-performance-android')
177-
```
178-
179195
## Contributing to flipper Desktop
180196

181197
1. Clone the repository.

0 commit comments

Comments
 (0)