March 2019
Intermediate to advanced
208 pages
5h 11m
English
We start the project as we have all the projects so far:
| | bsb -init shirts -theme basic-reason |
| | cd shirts |
Rather than using ReasonML’s built-in functions exclusively to create a program we can run via npm, we’ll be accessing a web page via the DOM. While ReasonML does provide a limited DOM library via BuckleScript (https://bucklescript.github.io/bucklescript/api/Dom.html), a more powerful external library is available—bs-webapi (https://github.com/reasonml-community/bs-webapi-incubator). First, we install the module with an npm command:
| | > npm install --save bs-webapi |
Then, we put it in the bs-dependencies section of file bsconfig.json:
| | // This is the configuration file ... |
Read now
Unlock full access