nextjs-jsoneditor

0.0.2 • Public • Published

nextjs-jsoneditor

NPM JavaScript Style Guide

Install

npm install --save jsoneditor
npm install --save nextjs-jsoneditor

Usage

In Nextjs,add this css file in styles folder under src folder and call css file in _app.js.

https://drive.google.com/file/d/18xVG9kJdbbN8vHrr2Jb5sYXU_rdeDrfn/view?usp=sharing

_app.js

import './nextjs-jsoneditor.css' //download this file and use as global css in nextjs

function MyApp({ Component, pageProps }) {
  return <Component {...pageProps} />;
}

export default MyApp;

index.js

import React, { Component } from 'react'
const JsonEditor = dynamic(
  {
    loader: () => import("nextjs-jsoneditor").then((mod) => mod.JsonEditor),
    render: (props, JsonEditor) => {
      return JsonEditor;
    },
  },
  {
    ssr: false,
  }
);

class Example extends Component {
  render() {
    return <JsonEditor value={{
      name: 'John Doe',
    }}/>
  }
}

License

MIT © raja-poudel

nextjs-jsoneditor

Dependencies (0)

    Dev Dependencies (20)

    Package Sidebar

    Install

    npm i nextjs-jsoneditor

    Weekly Downloads

    107

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    277 kB

    Total Files

    7

    Last publish

    Collaborators

    • raja-poudel