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.
npm install formalist-serialize-reactA React serializer for a Formalist-compatible abstract syntax tree. It’ll take your complex, nested AST and output a series of flat hidden-inputs.
``js`
import serialize from 'formalist-serialize-react'
const data = [...] // Formalist compatible AST
serialize(data)
//
You can set a prefix for the input names:
`js`
let options = {
prefix: "user"
}
serialize(data, options)
//
```
$ npm run test