Skip to content

Commit b63de2b

Browse files
committed
Update documentation
1 parent 06285b0 commit b63de2b

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## Important Notes
44

5-
* This state provider client requires that the flipper-plugin-recoil plugin be installed within your Desktop Flipper client application in order to work.
5+
* This state provider client requires that the [flipper-plugin-react-native-recoil
6+
](https://www.npmjs.com/package/flipper-plugin-react-native-recoil
7+
) plugin be installed within your desktop Flipper client application in order to work.
68
* State reporting functionality may be relying on experimental or unstable Recoil hooks.
79

810
## Requires
@@ -12,11 +14,33 @@
1214

1315
## Installation
1416

15-
Make sure you install `react-native-flipper` as well as this client.
17+
Make sure you NPM install `react-native-flipper` in addition to this client. (e.g. `npm i --save react-native-recoil-flipper-client react-native-flipper`). Although Flipper support is enabled in React Native by default, the functionality provided by react-native-flipper is not.
1618

1719
## Usage
1820

1921
Add this client to your React Native project by mounting it within your App JSX tree anywhere, but ideally immediately inside RecoilRoot.
22+
23+
To mount the client, you'll want to import the client (1) and use the JSX tag as follows:
24+
25+
```
26+
import React from 'react';
27+
import { RecoilRoot } from 'recoil';
28+
import { RootRouter } from './route';
29+
import { RecoilFlipperClient } from 'react-native-recoil-flipper-client'; (1)
30+
31+
function App() {
32+
return (
33+
<RecoilRoot>
34+
<RecoilFlipperClient /> (2)
35+
<RootRouter />
36+
</RecoilRoot>
37+
);
38+
}
39+
40+
export default App;
41+
```
42+
Where RootRouter is your main App's entry point.
43+
2044
## Development
2145

2246
...

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"jsx": "react",
3+
"jsx": "react-jsx",
44
/* Visit https://aka.ms/tsconfig.json to read more about this file */
55

66
/* Basic Options */

0 commit comments

Comments
 (0)