February 2019
Beginner to intermediate
180 pages
4h 4m
English
We've already seen how we can use raw JavaScript in Reason. Let's now focus on how to bind to existing JavaScript. To bind a value to a named reference, we typically use let. That binding can then be used in subsequent code. When the value we want to bind to lives is JavaScript, we use external. The external binding is like a let, in the sense that it can be used in subsequent code. Unlike let, external is typically accompanied by BuckleScript decorators such as [@bs.val].
Read now
Unlock full access