Skip to content

Commit 3c2defa

Browse files
committed
improve readme
1 parent 58091ca commit 3c2defa

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,33 @@ Run Project
2323
npm start
2424
```
2525

26+
## Use Case
27+
28+
```js
29+
import React from 'react';
30+
import JsonViwer from './JsonViwer'
31+
32+
//using mock data for test
33+
const MOCK_DATA = {
34+
name: "Additya Rajput",
35+
skills: ['Javascript', 'HTML', 'CSS', 'Typescript', 'React'],
36+
address: {
37+
place: "bengaluru",
38+
pincode: 560095
39+
},
40+
github_url: "https://github.com/apsrcreatix"
41+
}
42+
43+
//this wrapper is just an example and not needed
44+
export default function Wrapper(props){
45+
return <div className="wrapper">
46+
<JsonViwer json={ MOCK_DATA || props.json } />
47+
</div>
48+
}
49+
```
50+
51+
52+
2653
## TODO
2754

2855
- [x] To remove the dependency of classnames from component.

0 commit comments

Comments
 (0)