Summary
By now, we've seen how Reason can help us build safer, more maintainable codebases with the help of its type system. Variants allow us make invalid states unrepresentable. The type system helps make refactoring a less scary, less painful process. Module signatures can help us to enforce business rules in our application. Module signatures also serve as basic documentation that lists what a module exposes and gives you a basic idea of how the module is meant to be used based on exposed function names and their argument types, as well as exposed types.
In Chapter 6, CSS-in-JS (in Reason), we'll look at how we can use Reason's type system to enforce valid CSS using a CSS-in-Reason library that wraps Emotion (https://emotion.sh), called ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access