Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.01 KB

README.md

File metadata and controls

59 lines (40 loc) · 1.01 KB

Simple JSON Viewer Component

Netlify Status

Scripts

Run Dependency Installation

npm install

Build

npm build

Run Project

npm start

Use Case

import React from 'react';
import JsonViwer from './JsonViwer'

//using mock data for test
const MOCK_DATA = {
    name: "Additya Rajput",
    skills: ['Javascript', 'HTML', 'CSS', 'Typescript', 'React'],
    address: {
        place: "bengaluru",
        pincode: 560095
    },
    github_url: "https://github.com/apsrcreatix"
}

//this wrapper is just an example and not needed
export default function Wrapper(props){
    return <div className="wrapper">
		<JsonViwer json={ MOCK_DATA || props.json } />
         </div>
}

TODO

  • To remove the dependency of classnames from component.

Forked From & Thanks

Demo: https://cakeinpanic.github.io/simple-react-json-viewer/