thoth-org / Thoth.Elmish.FormBuilder

https://thoth-org.github.io/Thoth.Elmish.FormBuilder/
MIT License
10 stars 5 forks source link

[FormBuilder] Take a look for react performance #4

Open MangelMaxime opened 4 years ago

MangelMaxime commented 4 years ago

Issue by MangelMaxime Wednesday Nov 28, 2018 at 10:08 GMT Originally opened as https://github.com/MangelMaxime/Thoth/issues/90


I think the library "BasicFields" should by default offer optimized react experience.

MangelMaxime commented 4 years ago

Comment by fergusmeiklejohn Thursday Nov 29, 2018 at 03:19 GMT


I think BasicFields should offer a "withDefaults" experience. Most apps might only ever need BasicFields.

MangelMaxime commented 4 years ago

Comment by MangelMaxime Thursday Nov 29, 2018 at 06:55 GMT


What do you mean by "withDefaults" ?

MangelMaxime commented 4 years ago

Comment by fergusmeiklejohn Thursday Nov 29, 2018 at 08:10 GMT


Ideally we would have the most common types of field and they would come with sensible defaults including validation as standard. I was wondering about using validator.js for this: https://github.com/chriso/validator.js https://www.npmjs.com/package/@types/validator Like you know how in html a Form at it's most basic is:

  <form>
    <input name="name" placeholder="Name" />
    <input name="email" placeholder="Email" type="email" />
    <input type="submit">
  </form>

I wonder if we could make BasicFields (maybe in Fulma?) as close as possible to this sort of simple experience, but of course with all the power of F# and this library behind the simple interface

Apologies this has little to with React, more to do with "optimized experience"