Meteor React Form: Autoform for React

Yes I think that’s exactly the point, this is all about Meteor flavoured React which you don’t get in npm.

Okay no problem, I just wanted to point these out so people don’t feel limited to these solutions.

3 Likes

I’ve definitely been pondering this lately, but I’m trying to finish rewriting SimpleSchema before moving on to what to do about autoform.

I definitely think it’s a good idea to try to have separate packages for auto form generation vs. auto form state/validation/submission. The latter can easily be done as a vanilla js library, which might already exist, and then packages can wrap it to convert events into reactive UI updates.

I agree that the best approach is to use the best of what already exists as stable npm/jQuery packages and write small adapters if possible.

The devil is in the details. There are many places where the current tighter coupling is nice and will be hard to properly split.

If anyone wants to work on this or already has related packages or ideas, contact me and I can try to coordinate efforts.

5 Likes

This code looks very nice and clean @nicolaslopezj. I would not miss Autoform, and since I’m using React, autoform doesn’t work anyway.

I’m looking into how to use it for my project. For example https://github.com/mantrajs/meteor-mantra-kickstarter is using tcomb-form, but I think MRF is much nicer, especially for Meteor support.

I wonder if you’re planning to use MRF for Orionjs 2.0, or you’re sticking with Blaze, or both options, or is Orion even being developed further given Meteor is moving towards NPM?

1 Like

Now I would to try Mantra too.
My old project use Auto Form at all, so I have problem about this.

All of sudden, there are plenty of Autoform-like packages for React.

One of the best so far for me is this: https://github.com/vazco/uniforms

The code is clean and straight-forward. You can easily create your own form-components and e.g. design them in a storybook (https://github.com/kadirahq/react-storybook).

I hope that one or two of these packages become a defacto standard like autoform. This would lead the way to schema-based admin tools like orion or meteor-admin, but in react. :blush:

3 Likes

I just want to also plug uniforms - I’ve been using it for a year+ and it’s beautiful. It has magic AutoForm & AutoField, but you can use each component (forms and fields) without the magic and creating your own custom variations is pretty easy (very easy once you understand how it works).

You are not locked into redux, mobx, meteor, nor whatever, but you can easily integrate with any of them (a custom AutoForm.onChange or other form to tie state into whatever system you want) – it also works with a variety of schemas.

4 Likes