> [bucklescript](https://bucklescript.github.io/en) bindings to [log-update](https://github.com/sindresorhus/log-update)
npm install reason-log-update> bucklescript bindings to log-update
npm install reason-log-update log-update --save
Then add reason-log-update to bs-dependencies in bsconfig.json
``json`
{
...
"bs-dependencies": [
...
"reason-log-update"
]
}
`reason
let frames = [|"-", "\\", "|", "/"|];
let i = ref(0);
let interval =
Js.Global.setInterval(
() => {
i := (i^ + 1) mod Array.length(frames);
let frame = frames[i^];
LogUpdate.update(
{j|
♥♥
$frame unicorns $frame
♥♥
|j},
);
},
80,
);
ignore(Js.Global.setTimeout(() => Js.Global.clearInterval(interval), 3000));
``
See the LogUpdate.re and the documentation;