# react-json-view-compare

> React json compare view plugin, supports expansion and hiding.use react hooks.

Latest version **2.0.2** (published 2023-03-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-json-view-compare
pnpm add react-json-view-compare
yarn add react-json-view-compare
bun add react-json-view-compare
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2023-03-30 |
| First published | 2020-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 115.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 46 |
| Author | coolapt |
| Maintainers | coolapt |
| Keywords | array-viewer, base-16, component, interactive, interactive-json, json, json-component, json-display, json-tree, json-view, json-viewer, json-inspector, json-tree, json-compare, compare, version-compare, version, react, react-component, react-json, theme, tree, tree-view, treeview |

## Links

- npm: https://www.npmjs.com/package/react-json-view-compare
- Repository: https://github.com/5SSS/react-json-view-compare
- Homepage: https://github.com/5SSS/react-json-view-compare#readme
- Issues: https://github.com/5SSS/react-json-view-compare/issues
- npm.io page: https://npm.io/package/react-json-view-compare

## Dependencies (1)

- [react-json-viewer-cool](https://npm.io/package/react-json-viewer-cool.md) ^2.0.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.0.2 (latest) — 2023-03-30
- 2.0.1 — 2022-02-09
- 2.0.0 — 2022-02-09
- 1.0.3 — 2021-01-05
- 1.0.2 — 2020-08-20
- 1.0.0 — 2020-04-02

## README

# react-json-view-compare

React json compare view plugin, supports expansion and hiding. Uses react hooks.

## live demo

- https://codesandbox.io/s/jovial-meadow-v17pw

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/5SSS/react-json-view-compare)

## Links

- [Github](https://github.com/5SSS/react-json-view-compare)

## Install

```js
npm install --save react-json-view-compare
```

## Usage

```jsx
import ReactJsonViewCompare from 'react-json-view-compare';

const oldData = {
  name: 'super',
  age: 18,
  task: [
    { name: 'eat', time: '09:00' },
    { name: 'work', time: '10:00' },
    { name: 'sleep', time: '22:00' }
  ]
};
const newData = {
  name: 'coolapt',
  age: 20,
  task: [
    { name: 'eat', time: '09:00' },
    { name: 'work', time: '10:00' },
    { name: 'sleep', time: '23:00' },
    { name: 'running', time: '08:00' }
  ]
};
function App() {
  return <ReactJsonViewCompare oldData={oldData} newData={newData} />;
}
ReactDOM.render(<App />, document.getElementById('root'));
```

## Example

![示例1](./assets/images/merge.png)

## Props

| Attribute | Type | Default |
| --------- | ---- | ------- |
| oldData   | any  | no      |
| newData   | any  | no      |

## Events

not yet...

## PS

如果喜欢请给个星星，谢谢。
If you like, please give me a star, thank you.

如果需要帮助: QQ:1573815240 邮箱: 1573815240@qq.com
if you need help: QQ:1573815240 email: 1573815240@qq.com

---
_Source: https://npm.io/package/react-json-view-compare · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
