Skip to content
This repository has been archived by the owner on May 15, 2021. It is now read-only.

sophiabrandt/reason-form

Repository files navigation

Contributors Issues MIT License


Logo

Reason Form

Build a React form with ReasonReact
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

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:

Built With

Getting Started

To get a local copy up and running follow these steps:

Prerequisites

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

Installation

  1. Clone the repo
git clone https://github.com/sophiabrandt/reason-form.git
  1. Install NPM packages
cd reason-form && yarn install
  1. 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.

Usage

Run the project locally under http://localhost:3000 via:

npm run start

Create a production build:

npm run build

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Sophia Brandt - @hisophiabrandt

Project Link: https://github.com/sophiabrandt/reason-form

Acknowledgements