Reusable Components for Form-Building #439
aust1nz
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Conform gives you, as a developer. lots of options for how you'll set up your forms. For a particular project, you might find that you want to choose the same set of options every time, and selecting the validate: "onBlur" option for each new form can be a bit tedious. Fortunately, Conform (and React more generally) are really composable! Here's a quick demo (with just text/select inputs) explaining how your forms can hide boilerplate.
CodeSandbox Example
Here's what a form JSX might look like, while still populating the required HTML values, displaying errors, etc.
If you've been working with Conform for awhile, you've probably get this sort of components in your library already, but my aim is to make this obvious and easy to grasp for folks just considering the library or looking for ways to avoid repetition.
Beta Was this translation helpful? Give feedback.
All reactions