Skip to content

ivanzusko/react-diff2

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published