Forms: Pattern Construction

WARNING! v0.13 was just released, and the tutorial is currently undergoing final testing. It's recommended that you DO NOT follow along until this message is removed (please check back tomorrow).

Mental model for the forms implementation


At first, how the hooks build forms likely won't make much sense. This walks through a series of refactors to demonstrate the pattern used by the hook and how it came to be.

The goal is to provide an understanding of how the hook actually works, so you can feel in control of it. But also to provide the reasoning for the hook, because if you disagree with the reasoning, the implementation is unlikely to be something you want to use.

Another goal is that by explaining the reasoning and construction patterns, even if you don't want to use the form libraries, you may find some useful ideas to take back to your own applications.

Unlike the Quickstart, this tutorial will not provide a choice in preferred syntax. All React code will be using createReactClass.

This is the application we'll be working with:

Next Steps

Ready? Let's get started!