Skip to content

MiaXIA/ReactJSONFormatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project was bootstrapped with Create React App.

React JSON Formatter

A small demo for reusable React Component. It takes data object and format it to a more readable JSON format

Example ScreenShot

image

Build and Run Locally

use command in terminal

cd /the path where this folder is
npm install
npm start

Then it will run at localhost:3000

Usage

Include the JSONFormatter.js file and provide the variable to render as the data property.

import JSONFormatter from "/path to JSONFormatter.js";

var data = {
  str: 'Test String',
  bool: true,
  num: 0,
  arr: [
    'Test Array',
    {
      key: 'Test Object Key'
    }
  ]
}

<JSONFormatter data={data} />

About

Uses ReactJS generate JSON format Element

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published