Nice explanation. One thing I personally like about using the Js module is that it compiles to native JS methods.
myArray|>Js.Array.map(x=>x*3);
turns into:
myArray.map(x=>x*3);
If you use Array or Belt, then the JS output will import functions from the Bucklescript library and use those instead. I'm assuming there isn't much of a difference in the end, but why import extra functions if you don't have to?
That's a really good point especially if you're targeting JavaScript. I'm hoping to dive more into the differences between the modules, and what the benefits of each are. It doesn't seem like the community has fully decided on which is the defacto set of modules to use, and at first the differences seem rather small, but I've noticed there's quite a bit of nuance.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice explanation. One thing I personally like about using the
Jsmodule is that it compiles to native JS methods.turns into:
If you use
ArrayorBelt, then the JS output will import functions from the Bucklescript library and use those instead. I'm assuming there isn't much of a difference in the end, but why import extra functions if you don't have to?That's a really good point especially if you're targeting JavaScript. I'm hoping to dive more into the differences between the modules, and what the benefits of each are. It doesn't seem like the community has fully decided on which is the defacto set of modules to use, and at first the differences seem rather small, but I've noticed there's quite a bit of nuance.