Formalist Serialize React
A React serializer for a Formalist-compatible abstract syntax tree. It’ll take your complex, nested AST and output a series of flat hidden-inputs.
Usage
const data = ... // Formalist compatible AST// <input name="foo" value="bar" type="hidden"/>
You can set a prefix for the input names:
let options = prefix: "user"// <input name="user[foo]" value="bar" type="hidden"/>
Tests
$ npm run test