Future Export: The road to v2 #954
Replies: 3 comments 10 replies
-
Awesome. I'm excited to explore those new APIs. It would also be great to have something like |
Beta Was this translation helpful? Give feedback.
-
I wonder if this opens up a path to progressively enhancing a form to auto-submit when certain values are changed. Any thoughts? Right now our typical approach is a Headless UI component with an If we could use a standard I gave this a quick try using |
Beta Was this translation helpful? Give feedback.
-
Any plans for adding per-field validation, especially async validation? For instance, checking if a username is available while typing out the form. With TanStack Form's async validation), I'm able to show a loader on the field while it's validating (the validator is just a Server Action) and then a checkmark if it's successful (still trying to figure out how to do this part with Conform). But the best part about per-field async validation is that it's super easy to write shared code that sets up entire forms without having to create schemas differently depending on whether or not I'm using async validation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It's been over a year since Conform's first major release and we have learned a lot since then. We have seen where people get stuck, where the API causes confusion, and where the complexity starts to pile up. We want to fix those things — but without making the code more complicated.
Over the past 6 months, we have been exploring a new model. We believe it's simpler, more flexible, and easier to reason about without giving up type safety or progressive enhancement. But instead of rushing to v2, we want to validate these ideas with the community first.
That's what the new
future
export is for:This is a place for experimental APIs we're ready to share but still refining. They are opt-in, and you can adopt them gradually. As these APIs mature, we'll offer migration guides and eventually promote them as the new defaults in v2. Until then, they might include breaking changes in minor versions. So we recommend locking your version range to patch when using them.
We're planning to roll out the first public release of the future export soon, and we're sharing this early so it's not a surprise when it lands — and to avoid confusion when you see new APIs appear.
First up
The first future API is
useControl
— a new hook that helps you integrate custom inputs with Conform. Compared touseInputControl
, it offers a more flexible setup with better support for multi select, file inputs and checkbox groups.The first public release of this API is just a few days away. We are sharing this announcement early so you can get an idea of what's coming and let us know what you think.
(Update: released in v1.7.0)
What's coming next
In the coming weeks, you will see:
useFormData
hook to subscribe to form data and compute derived state (Update: released in v1.8.0)useForm
hook with more control over form state and metadataparse
helpers with better async validation supportAll of these will be released through the
future
export and get their own write-up.If you try any of these APIs, we would love to hear how they go — what works, what doesn't, and what could be better. Your feedback will help shape the next major version of Conform.
Beta Was this translation helpful? Give feedback.
All reactions