Build a React form with ReasonReact
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
UPDATE: ReasonML + BuckleScript is now Rescript. As the ecosystem has changed around those tools, this repository is out of date.
Build a form with ReasonReact and React hooks
The project demonstrates how to create a form with form validation and custom hooks in ReasonML.
☞ View Demo.
Try to submit a form. A successful submit logs to the JavaScript console (there is no back-end logic implemented).
This repository follows my process of learning ReasonReact:
- Learning ReasonReact Step by Step Part: 0
- Learning ReasonReact Step by Step Part: 1
- Learning ReasonReact Step by Step Part: 2
- Learning ReasonReact Step by Step Part: 3
- Learning ReasonReact Step by Step Part: 4
- Learning ReasonReact Step by Step Part: 5
- Learning ReasonReact Step by Step Part: 6
- Learning ReasonReact Step by Step Part: 7
- Learning ReasonReact Step by Step Part: 8
- Learning ReasonReact Step by Step Part: 9
- Learning ReasonReact Step by Step Part: 10
To get a local copy up and running follow these steps:
You need npm or yarn.
- npm
npm install npm@latest -g
- yarn
npm install yarn -g
Install Bucklescript and Reason:
npm install -g bs-platform --unsafe-perm # or yarn global add bs-platform --unsafe-perm
- Clone the repo
git clone https://github.com/sophiabrandt/reason-form.git
- Install NPM packages
cd reason-form && yarn install
- Checkout commit
If you want to see the basic form without validation:
git fetch && git fetch --tags
git checkout finished-basic-form-with-dev-routing
Otherwise just use the master branch.
Run the project locally under http://localhost:3000
via:
npm run start
Create a production build:
npm run build
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Sophia Brandt - @hisophiabrandt
Project Link: https://github.com/sophiabrandt/reason-form