A JSON editor packed as a React.js component and the simplest way of creating web forms.
npm install react-jsonPlay safe with react-json forms in the playground.
React-json is like having an special input type for JSON objects, developers only need to listen to changes in the JSON instead of writing all the boilerplate needed to handle every single input of the form. It comes with top features:
* Field type guessing for quick forms
* Validation
* Styles easily customizable
* Extensible with custom field types
js
var doc = {
hola: "amigo",
array: [1,2,3]
};React.render(
,
document.body
);
function logChange( value ){
console.log( value );
}
`
See this example workingA simple form creator
Do you hate creating forms? React-json handles all the dirty markup for you, and makes you focus in what is important;
`js
var doc = {
user: "",
password: ""
};// form: true
// make objects not extensible,
// fields not removable
// and inputs always visible
var settings = {
form: true,
fields: { password: {type: 'password'} }
};
React.render(
,
document.body
);
``