Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rescriptbr/reform
π Reasonably making forms sound good
https://github.com/rescriptbr/reform
forms react react-form reasonml reform rescript rescript-forms rescript-react rescript-react-form typed-form
Last synced: 13 days ago
JSON representation
π Reasonably making forms sound good
- Host: GitHub
- URL: https://github.com/rescriptbr/reform
- Owner: rescriptbr
- License: mit
- Created: 2017-10-25T15:21:42.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-22T12:20:03.000Z (10 months ago)
- Last Synced: 2024-04-14T10:15:41.013Z (7 months ago)
- Topics: forms, react, react-form, reasonml, reform, rescript, rescript-forms, rescript-react, rescript-react-form, typed-form
- Language: ReScript
- Homepage: https://rescript-reform.netlify.app/
- Size: 4.94 MB
- Stars: 351
- Watchers: 8
- Forks: 41
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - reform
README
[![All Contributors](https://img.shields.io/badge/all_contributors-13-orange.svg?style=flat-square)](#contributors)
[![npm version](https://badge.fury.io/js/@rescriptbr%2Freform.svg)](https://badge.fury.io/js/@rescriptbr%2Freform)
Documentation β’
Installation β’
Getting started β’
Live demo
## Installation π¦
```
yarn add @rescriptbr/reform @rescriptbr/reschema
```Then add it to bsconfig.json
```
"bs-dependencies": [
"@rescriptbr/reform",
"@rescriptbr/reschema"
]
```Then add lenses-ppx
```
yarn add lenses-ppx -D
```And update your bsconfig.json with `ppx-flags`
```
"ppx-flags": [
"lenses-ppx/ppx"
]
```## Why? π‘
As you might know, you can use any existing React / JavaScript libraries with ReScript, including form libraries like Formik, react-hook-form, Final Form, since you install or create bindings for these libraries. ReForm is not a set of bindings for an existing form library, it was created from scratch to use with ReScript and React.
Code that deals with strongly typed forms can quickly become walls of repeated text. We created ReForm to be both deadly simple and to make forms sound good leveraging ReScript's powerful typesytem. Even the schemas we use are nothing more than constructors built-in in the language itself with a small size footprint.
## Features β‘
- Hook API
- Schema API
- Type safe, `handleChange` properly infers the value of the field it is handling
- Context Provider
- Field component
- Validation strategy, OnDemand and OnChange## Alternatives π₯
- [Formality](https://github.com/alexfedoseev/re-formality)
## Support π
π We usually hang out at https://forum.rescript-lang.org/ so feel free to ask anything there.
π§π· π΅πΉ Se vocΓͺ Γ© Brasileiro, PortuguΓͺs ou fala portuguΓͺs, vocΓͺ pode entrar contato atravΓ©s do discord do [ReScriptBR](http://discord.com/invite/SSDMNYQ).
## Contributors β¨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Thomas Deconinck
π π»
Gabriel Rubens
π» π π€ π π
Lucas Besen
π§
Jefferson Carvalho
π»
Luiz Augusto Moratelli
π»
amythos
π»
Lalli Nuorteva
π
Matt
π§
Kyle Davis
π
Ulugbek Abdullaev
π
Khoa Nguyen
π»
Medson Oliveira
π» π€
Ana Luiza Portello Bastos
π
Freddy Harris
π
arthur
π π»
Marcos Oliveira
π π¨
Celso Bonutti
π»
Jason Smythe
π» π
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!