Summing Up
You now have the basics of interoperating with JavaScript: binding to JavaScript functions, working with JavaScript objects, and encoding and decoding JSON. For the full details of BuckleScript/ReasonML’s extensive interop capabilities, see https://bucklescript.github.io/docs/en/interop-overview.
You may have noticed in Working with Mutable Variables my reluctance—bordering on distaste—for talking about mutable objects and, in particular, mutable global state. This is an issue that bothers many people who are used to the functional programming style, and some exceptionally bright programmers have come up with an answer: reactive programming. That’s what we’ll investigate in the next chapter.
Footnotes
Get Web Development with ReasonML 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.