as described in here, I am going to create a CRUD list of cars:
Each car will able to assigned to a category (Small truck , medium truck, big truck, etc.), and each of the categories will have its own avatar indicating the size of the truck group.
In order to do so, I am looking for a React ready autoform package that works well with aldeed’s simpl-schema and collection2
I would like to ask, how are you handling those things in your apps? I am looking for a reusable solution that later on will be implemented in “Create user” form or “Users profile” page
Having used both of these packages my personal recommendation is Uniforms. I started out using SRF before I discovered Uniforms and had several issues and bugs that I couldn’t work past and found very little help from the developers of the package. Uniforms on the other hand is very well maintained and I’ve found them to be very responsive to issues as well as in the vazco/uniforms gitter room.
Do you guys always use AutoForm? I mean for now, I won’t have many forms in the app (10 -15 I guess), and this is the first time I am using a mix of Meteor and React. So for the understanding purposes maybe it will be better to take a hard way and built everything from scratch?
I would love to hear your opinion about this. I just like to have a hard grasp on stuff, and “automagic” generation is sometime stressfull to me once something is not working. In such cases I feel little bit powerless and confused
If you have the time/budget and want to learn, then by all means build everything from scratch. Just be aware that while forms always seem simple at the outset, once you dig in and start building them from scratch, you’ll quickly get bogged down in fairly trivial yet time consuming tasks like validation, state management, layout, testing, etc. Also, if you’re building a system that will be maintained by others in the future (or by your future self who might lose interest in building forms from scratch 6 months from now), just keep in mind that your custom / one-off approach might not be the best option from a maintenance point of view. Popular form libraries are used by thousands, in many different scenarios, so they benefit from a wide range of use-cases, testing scenarios, and feedback. There’s no guarantee that a form library you choose now will still be supported a year from now (or tomorrow in our JS world), but if it’s popular you can usually be fairly certain that it’s at least following best practices, and can be forked and maintained independently if needed.
Again though, if the intent is to learn then by all means dive in and handle all of it yourself. Maybe just keep in mind the impact that decision could have on your time and future maintenance plan.
Thank you for your reply, makes a lot of sense to me. Heh… after reading it from being decided to built from scratch I started having doubts. Need to consider all the things once again.
Fields like ColorField above are custom written (a simple wrapper around React-Color) using the tools provided by uniforms. I did the first couple version of those without the uniforms connector (which makes the field a one off, tightly coupled to the name of the field, and they don’t work as nicely, so I don’t recommend that), but once I wrapped my head around the HoC, it’s been easy and convenient to create new field types (like self-populating Select fields, and the like - I even wrapped TinyMCE).
This is IMO, the best way to organize forms. You get the convenience of the autoform, and the customizability of being able to strucure your own HTML. Beyond that, uniforms can work with multiple different schema systems including SimpleSchema and GraphQL, and has components for Bootstrap (above) and Material-UI, and others. I’m all in on uniforms.