🌹 @sharyn/client
This package provides client-side helpers.
🌹 Install
yarn add @sharyn/client
🌹 Usage
getFormData
import { getFormData } from '@sharyn/client/form'
const handleSubmit = e => {
console.log(getFormData(e.target))
}
const Form = () => (
<form onSubmit={handleSubmit}>
<input name="foo" />
<input type="submit" />
</form>
)
/*
onSubmit:
{ foo: [value] }
*/