Get unlimited public & private packages + team-based management with npm Teams.Learn more »

jsoneditor-for-react

0.0.1 • Public • Published

jsoneditor-for-react

React wrapper for jsoneditor

Also you can check the angular version: angular-jsoneditor

Installation

npm install jsoneditor-for-react --save

Usage

import React, { Component } from 'react';
import ReactJsonEditor from 'jsoneditor-for-react';
 
class App extends Component {
  ...
 
  editorChangeHandler = (values) => {
    console.log('new values', values)
    this.setState({values: values})
  }
 
  render() {
    return (
      <div className="App">
        <ReactJsonEditor values={this.state.values} onChange={(values) => {this.editorChangeHandler(values)}}/>
      </div>
    );
  }
}
 
export default App;

TODO

  • support jsoneditor options
  • support ace and ajv
  • examples and demos

Keywords

none

Install

npm i jsoneditor-for-react

DownloadsWeekly Downloads

80

Version

0.0.1

License

MIT

Last publish

Collaborators

  • avatar