-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: DX Improvements #20
Comments
Hello there, First of all, thank you for taking your time in maintaining this interesting project. I recently discovered this project and used it in an example project where I needed to deal with 2 simple forms (using My first impression was having a really simple and intuitive DX, when you already know Also it feels like a lot of code but I can't tell the difference with other libraries for now. It is not really a good/bad argument since everything can be encapsulated in the same file. Having validation schema + atoms + form component in the same file is a must-have. I think the most pain points for using this lib is the lack of features. The ones I can think of at the moment:
On a final note, the readme feels a little overwhelming. That can be interesting to extend the documentation and integrate it in the official Keep the good work. |
That would make this library dependent on the UI library you use so a more vanilla js approach for that is something we can do but then it's no more form state management but a form UI management, it's a nice suggestion so we might add it as a separate library that works with this one
This should be doable, as a
nice reminder, I do have a tiny function that I use, I should be able to add that into
We weren't sure of the current userbase as there's no way to know if people are using it or not and the amount of numbers online aren't a good measure either, I plan on adding a tiny website which would be easier to browse but let me confirm with @dai-shi if we plan on adding documentation for these into https://jotai.org |
Have you seen form-atoms? It has good DX and for me is go-to jotai form. Something close to this is FormKit available in vue (I've never used, but from skimming the docs I like their DX as well) |
Please see my comment in pmndrs/jotai#2260 (comment). |
I'd like to wait for more feedback so I can add in priorities to what needs to be added accordingly. |
For my part, I wanted to kick out react-form-hook and replaced it with something different. The main reason is I had multiple performance issues with that library (too many re-renderings due to how react-form-hook's context provider works). I tried different ways to optimize my code without any success. I decided on jotai (and now jotai-form to support validations). What a huge difference it made! I'm not going back. Now, as I wanted to add validations to my new jotai-based code, I realized that I could not easily add validations with jotai-form. Here's the explanation. My code was based on this approach (and using jotai-optics):
Now I want to add validation, let's say In the end, I removed jotai-optics completely, let jotai-form hold the values for me and keep these atoms in a different interface. It could be interesting to see if
Food for thoughts. And amazing job! |
Here's another enhancement request. When the The
As an example, a validate function could show errors only when the form has been submitted:
|
That's quiet a bit of features to pick up so closing this now |
jotai-form
has been out for more than a year nowand the additions of form control helpers has been here for a few months now. I'd like to gather up the users of jotai form to let us know of how we can help you have better experience using Jotai form.
We'd like answers for the following questions.
jotai-form
+jotai
The text was updated successfully, but these errors were encountered: