This commit is contained in:
Nathan Bierema 2021-08-25 23:24:10 -04:00
parent a82d207f4c
commit 5c2e24638a

View File

@ -7,21 +7,21 @@ React JSON Viewer Component, Extracted from [redux-devtools](https://github.com/
### Usage
```jsx
import JSONTree from 'react-json-tree'
import JSONTree from 'react-json-tree';
// If you're using Immutable.js: `npm i --save immutable`
import { Map } from 'immutable'
import { Map } from 'immutable';
// Inside a React component:
const json = {
array: [1, 2, 3],
bool: true,
object: {
foo: 'bar'
foo: 'bar',
},
immutable: Map({ key: 'value' })
}
immutable: Map({ key: 'value' }),
};
<JSONTree data={json} />
<JSONTree data={json} />;
```
#### Result: