@dr-kobros/react-jsoneditor

JSON editor for React. Wraps jsoneditor.

Stats

StarsIssuesVersionUpdatedCreatedSize
@dr-kobros/react-jsoneditor
3.0.14 years ago4 years agoMinified + gzip package size for @dr-kobros/react-jsoneditor in KB

Readme

Json editor component for React

What?

This component is a React wrapper for the jsoneditor NPM package.

Why?

Did not find a reasonable JSON editor component for react. Needed one. Did some research. Found a good editor library. Wrapped it.

How?


import ReactDOM from 'react-dom';
import JsonEditor from '@dr-kobros/react-jsoneditor';

const json = {
  tussin: 'lussutus',
  number: 666,
  array: [
    1,
    2,
    3,
  ],
  obu: {
    lipaiseppa: 'ankkaa',
  }
};

const onChange = json => {
  console.log(json);
};

// Editor configuration. See jsoneditor's API.
const options = {

}

ReactDOM.render(
  <JsonEditor value={json} onChange={onChange} options={options} />,
  document.getElementById('some_element')
);

examples

  • fork repo
  • yarn
  • yarn run storybook

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.