0.1.3 • Published 6 years ago

react-diff2 v0.1.3

Weekly downloads
122
License
MIT
Repository
github
Last release
6 years ago

react-diff2

Highlights the differences between two piece of data. Uses the diff module. Is a fork of react-diff project.

Installation

npm i react-diff2

Demo

http://cezary.github.io/react-diff/

Example

import React from 'react';
import Diff from 'react-diff2';

const Component = props => {
  ...
  return (
    <Diff
      inputA="gogol"
      inputB="google"
      type="chars"
    />
  );
}

or with json:

import React from 'react';
import Diff from 'react-diff2';

const Component = props => {
  ...
  return (
    <Diff 
      inputA={props.oldObject} 
      inputB={props.newObject} 
      type="json"
    />
  );
}

Original project

react-diff

License

MIT