Skip to content

Commit 028e69e

Browse files
committed
[docs] Add React integrations
1 parent 0c6fadd commit 028e69e

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

docs/Integrations.md

+35
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Integrations for js and non-js frameworks
22

33
Mostly functional:
4+
- [React](#react)
45
- [Angular](#angular)
56
- [Cycle](#cycle)
67
- [Ember](#ember)
@@ -15,6 +16,40 @@ In progress:
1516
- [Python](#python)
1617
- [Swift](#swift)
1718

19+
### [React](https://github.com/facebook/react)
20+
#### Inspect React props
21+
##### [`react-inspect-props`](https://github.com/lucasconstantino/react-inspect-props)
22+
```js
23+
import { compose, withState } from 'recompose'
24+
import { inspectProps } from 'react-inspect-props'
25+
26+
compose(
27+
withState('count', 'setCount', 0),
28+
inspectProps('Counter inspector')
29+
)(Counter)
30+
```
31+
32+
#### Inspect React states
33+
##### [`remotedev-react-state`](https://github.com/jhen0409/remotedev-react-state)
34+
```js
35+
import connectToDevTools from 'remotedev-react-state'
36+
37+
componentWillMount() {
38+
// Connect to devtools after setup initial state
39+
connectToDevTools(this/*, options */)
40+
}
41+
```
42+
43+
#### Inspect React hooks (useState and useReducer)
44+
##### [`reinspect`](https://github.com/troch/reinspect)
45+
```js
46+
import { useState } from 'reinspect'
47+
48+
export function CounterWithUseState({ id }) {
49+
const [count, setCount] = useState(0, id)
50+
// ...
51+
}
52+
```
1853

1954
### [Mobx](https://github.com/mobxjs/mobx)
2055
#### [`mobx-remotedev`](https://github.com/zalmoxisus/mobx-remotedev)

0 commit comments

Comments
 (0)