I’m confused about which modules I should be using. The documentation mentions Js.String2 but I can also just type “String” and get a bunch of useful functions. Same goes for Js.Array2 vs “Array”. There are other modules available automatically that are NOT mentioned in the documentation, like Stream, Stack, In32.
Which of these are ok to use?
Why aren’t they mentioned in the online documentation?
These other modules you are referring to should be from the Pervasives/OCaml stdlib which was inherited from OCaml (you should also see this from the imports in the compiled JS output).
As far as I know it is not recommended to use them since the API will most likely be removed in the future (see this post in the forum). I also find it confusing that they are not mentioned in the docs but are available on the global namespace nonetheless.
Always use the Js or Belt namespace, those are the standard libraries right now.