foxxy_input_value
v1.1.6
Published
foxxy-package
Downloads
17
Readme
Foxxy_input_value
Názov balíčka: foxxy_input_value
Popis: Pomocník pre získavanie value hodnôt z inputov vo formulári
Inštalácia: npm i foxxy_input_value
Licencia: MIT
Email: [email protected]
Priklad pouzitia:
import { useInputValue } from ....;
import { TypeForInputsObject } from ....;
function App() {
const { handleSubmit, reset } = useInputValue()
const submit = (v: TypeForInputsObject["v"]): void => {
console.log(v);
};
return (
<div className="App">
<form
onSubmit={(e) => handleSubmit(e, submit)}>
<label>
My inputs
<input
name='One'
type="text"
/>
</label>
<label>
My inputs two
<input
name='Two'
type="text"
/>
</label>
<button
type='submit'>
click me
</button>
<button
onClick={reset}>
reset
</button>
</form>
</div>
)
}
export default App