This is an experiment in writing Redux reducers for a React app in OCaml with BuckleScript.
I'm using nwb to run the React app because it's a very handy project.
const ACTION_NAME = "ACTION_NAME"
is a strange pattern, and OCaml datatypes are more expressive than JSON payloads with a "type" field. Also, OCaml match expressions beat switch statements by a mile, and OCaml's type checker can even warn you if your match guards do not provide full coverage.
For these reasons, I hacked together this proof-of-concept as a way to show you that you can use OCaml and JS side-by-side without a heroic amount of effort.
npm i
npm run build
npm run start