ninti
v0.2.10
Published
<h1 align="center"> NINTI ๐ </h1> <h3 align="center"> Tiny lib to help work with forms on React </h3>
Readme
Installation
Just add ninti to your project:
yarn add nintiBasics
Ninti exposes two default form elements: <Form /> and <Input />.
import React from "react";
import { Form, Input } from "ninti";
function App() {
function handleSubmit(data) {
console.log(data);
/**
* {
* email: '[email protected]',
* password: '123456'
* }
*/
}
return (
<Form onSubmit={handleSubmit}>
<Input name="email" />
<Input name="password" type="password" />
<button type="submit">Sign in</button>
</Form>
);
}