Installation
Dependencies 📦
Install reform and reschema:
yarn add @rescriptbr/reform @rescriptbr/reschema
@rescriptbr/reschemais a schema library that reform uses to validate form fields. Check out the official documentation.
Then add lenses-ppx:
yarn add lenses-ppx -D
lenses-ppxis a preprocessor that you can use to generate type-safe "getters" and "setters" to the form values. Check out the official documentation.
Then add these dependencies to bsconfig.json:
{
...
"bs-dependencies": [
+ "@rescriptbr/reform",
+ "@rescriptbr/reschema"
],
"ppx-flags": [
+ "lenses-ppx/ppx"
]
}