Using bs-css

While there is no official recommendation from the Reason team for a CSS-in-JS solution, many are currently using a library called bs-css that wraps the emotion CSS-in-JS library (version 9). The bs-css library provides a type-safe API for use in Reason. With this approach, we can have the compiler check our CSS as well. We'll get a feel for this library by converting our App.scss, which we created in Chapter 3, Creating ReasonReact Components.

To follow along, clone this book's GitHub repository and start from Chapter06/app-start using the following code:

git clone https://github.com/PacktPublishing/ReasonML-Quick-Start-Guide.gitcd ReasonML-Quick-Start-Guidecd Chapter06/app-startnpm install

To get started with bs-css, we'll ...

Get ReasonML Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.