reforml
v0.4.0
Published
react form defined by yaml
Downloads
2
Readme
reforml
react form defined by yaml
Install
npm i reforml
Usage
https://dipsywong98.github.io/reforml/
import {BaseForm} from 'reforml'
import React, {useState, useMemo} from 'react'
export default () => {
const [value, setValue] = useState({})
const fields = useMemo(() => ({
myField: {
type: 'text',
label: 'my field'
}
}), [])
return (
<BaseForm fields={fields} value={value} onChange={setValue}/>
)
}
Development
yarn # install dependencies to all packages
yarn start # start the build watcher for reforml
yarn example # start the example
yarn docs # start the development server of documentation
License
MIT © dipsywong98