shakacode / re-formality

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

Updates rescript syntax in docs #120

Closed EthanBonsignori closed 6 months ago

EthanBonsignori commented 1 year ago

Hi there 👋

I was reading the docs and noticed some syntax was out of date so I made a few changes that do the following:

  1. replaces type wrappers using () with <> option('type) -> option<'type>
  2. changes form ppx extension syntax with from being wrapped in [] to wrapping with (): [%form ...]; -> %form(...)
  3. removes [] from wrapping attributes: [@react.component] -> @react.component and with args i.e. an input type: [field]: @field.async(mode: OnBlur) string,
  4. adds the rec keyword where missing to type examples that are followed by and type = ...

I took into account https://github.com/shakacode/re-formality/pull/119 and did not make the same changes they already did

alex35mil commented 6 months ago

@EthanBonsignori Sorry, I missed your PR either. Thank you!