rsc-form
v0.0.1
Published
A thin React client form component that automatically resets the form after submission.
Downloads
2
Readme
rsc-form
A thin React client form component that automatically resets the form after submission.
Installation:
bun add rsc-form
Usage:
import {Form} from 'rsc-form'
function ServerComponent() {
async function handleSubmit(formData) {
"use server"
// do something
}
return (
<Form action={handleSubmit}>
<label>
Name:
<input type="text" name="name" />
</label>
<button type="submit">Submit</button>
</Form>
)
}
Contributing:
build
bun run build
test
bun test
Tools:
- Typescript
- SWC
- Bun