Skip to content

Latest commit

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ReactJSON

This repository has a reconciler to convert React trees to JSON.

constPlayer=()=>{return(<player><life>20</life><mana>20</mana></player>);};constState=()=>{return(<state><Player/><Player/></state>);};constroot={};ReactJSON.mount(<State/>,root);console.log(root);// {// "children": [// {// "type": "state",// "children": [// {// "type": "player",// "children": [// {// "type": "life",// "children": [// {// "type": "text",// "value": "20"// }// ]// },// {// "type": "mana",// "children": [// {// "type": "text",// "value": "20"// }// ]// }// ]// },// {// "type": "player",// "children": [// {// "type": "life",// "children": [// {// "type": "text",// "value": "20"// }// ]// },// {// "type": "mana",// "children": [// {// "type": "text",// "value": "20"// }// ]// }// ]// }// ]// }// ]// }

About

Use React to create JSON treees

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages