Member-only story
React Formik and simple form validation.

Let's start with creating react application in our local environment. For that we open the command line and go to a desktop folder using:
cd Desktop/
After that create react application with:
npx create-react-app testapp
After the React project is created on your computer, open it with the code editor you used and open the App.js file. Clear App.js file and copy it for starting.
export default function App() { return ( <div className="App"> <form> <label htmlFor='name'>Name</label>
<input id='name' type='text' placeholder='Name' /> <label htmlFor='email'>Email</label>
<input id='email' type='email' placeholder='Email'/> <button type='submit'>Submit</button> </form> </div>);}
This is the basic form for our application.
Let's add the formik package to our application. Open up the terminal write:
npm i formik