@altiore/form
Advanced tools
Comparing version 0.3.26 to 0.3.27
{ | ||
"name": "@altiore/form", | ||
"version": "0.3.26", | ||
"version": "0.3.27", | ||
"description": "Form helper for building powerful forms", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -11,2 +11,5 @@ # Altiore Form | ||
**русская версия** | ||
[**README.RU.md**](README.RU.md) | ||
## Why? | ||
@@ -29,1 +32,22 @@ | ||
``` | ||
## Simplest usage | ||
```tsx | ||
import React, {useCallback} from 'react'; | ||
import {Form} from '@altiore/form'; | ||
const MyForm = () => { | ||
const handleSubmit = useCallback((values) => { | ||
console.log('form.values is', values); | ||
}, []); | ||
return ( | ||
<Form onSubmit={handleSubmit}> | ||
<input name="name" /> | ||
<button type="submit">Submit</button> | ||
</Form> | ||
); | ||
}; | ||
``` |
57351
83
52