🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

nextjs-jsoneditor

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nextjs-jsoneditor

>

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
255
37.1%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

nextjs

FAQs

Package last updated on 11 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts