
We’ll be editing the React code in this tutorial. The new tab should display an email address input, a submit button, and some React code. Setup Option 1: Write Code in the Browserįirst, open this Starter Code in a new tab. There are two ways to complete this tutorial: you can either write the code in your browser, or you can set up a local development environment on your computer.

You can use the Babel REPL to check what ES6 code compiles to. In this tutorial, we’re using arrow functions, let, const, spread syntax, destructuring, computed property names, and async/await. You’ll need to have familiarity with HTML, CSS, modern JavaScript, and React (and React Hooks) to fully understand Formik and how it works. If the code doesn’t make sense to you, don’t worry! The goal of this tutorial is to help you understand Formik. You can see what we’ll be building here: Final Result.

In this tutorial, we’ll build a complex newsletter signup form with React and Formik. If you’re impatient and just want to start hacking on your machine locally, check out the 60-second quickstart. This will teach you everything you need to know to build simple and complex forms in React.
