shakacode / re-formality

Form validation tool for reason-react
https://re-formality.now.sh
MIT License
244 stars 35 forks source link

Add fields comparator to config of form make functor #53

Closed Coobaha closed 5 years ago

Coobaha commented 5 years ago

Adds helper functors to provide custom fields comparator to form config

resolves #52

Coobaha commented 5 years ago

One thing i am not happy with this approach is js output, it is inlined per functor.

Coobaha commented 5 years ago

Seems that bucklescript doesn't inline modules when they are coming from the other file

Coobaha commented 5 years ago

I moved make functors to new files, this eliminates duplicated output (and adds a lot of diff :D) I made potential internal breaking changes (module aliases were moved in files prefixed with __). Maybe worth to add to the changelog

Coobaha commented 5 years ago

@alexfedoseev ping! :)

Coobaha commented 5 years ago

@alexfedoseev no worries, renaming done :)

alex35mil commented 5 years ago

@Coobaha Renaming looks good! And the second point?

Coobaha commented 5 years ago

ah, sorry i've missed it. My initial version was using functors in the same file. Problem is that it doubles the size of javascript output, Bucklescript inlines same code to Make and to MakeWithId

alex35mil commented 5 years ago

Oh, good catch! Then LGTM. Thanks again!