import React from "react"
import { createForm } from "@corets/form"
import { useForm } from "@corets/use-form"
const Example = () => {
const form = useForm(() => createForm({ text: "foo" }))
return (
<>
<input
value={form.get("text")}
onChange={(e) => form.set("text", e.target.value)} />
// with the static field
<input
value={form.getFields().text.get().getValue()}
onChange={(e) => form.getFields().text.get().setValue(e.target.value)} />
</>
)
}