Skip to content

jakemmarsh/react-native-diff-view

Repository files navigation

react-native-diff-view Build Status David

A React Native module for parsing and displaying git diffs. This library was heavily inspired by, and borrows code from, react-diff-view.

Overview

The purpose of this library is to parse and render a unified diff view for any provided diff(s). The flexible widget system also allows for rendering of custom elements on a per-line basis. The end result will look something like this:

Example diff with a comment widget

Getting Started

npm install --save react-native-diff-view

Usage

Parsing Diffs

Rendering Diff Hunks

Wrapping Hunks in Decorations

Rendering Widgets

Styling

Events

Contributing

🎊 Thanks for considering contributing!

This library is used and primarily maintained by Monolist. Issue reports and pull requests are always welcome.

To get started:

  1. git clone https://github.com/Monolist/react-native-diff-view.git
  2. cd react-native-diff-view
  3. npm install

To test your changes before opening a PR:

npm test

About

A React Native module for parsing and displaying git diffs.

Topics

Resources

License

Stars

Watchers

Forks

Packages