February 2019
Beginner to intermediate
180 pages
4h 4m
English
Remember when BuckleScript bindings felt kind of obscure? Hopefully, they're now starting to feel a bit more straightforward:
[@bs.val] [@bs.scope "localStorage"] external getItem: string => string = "";[@bs.val] [@bs.scope "localStorage"]external setItem: (string, string) => unit = "";
To parse the JSON, we'll use the Js.Json module.
Soon, you'll see one way to use the Js.Json module to parse JSON strings. One caveat, though: it's a bit tedious. But it's important to understand what is going on and why we need to do this for typed languages such as Reason. At a high level, we will validate the JSON ...
Read now
Unlock full access