Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

How to handle the fact that js and js libs are throwing exceptions all over?

$
0
0

Unlike Elm, ReScript makes it easy to interact with external JS. You lose the safety that it brings in Elm, but it makes adoption easier and it allows ReScript to be part of the JS ecosystem and not something separate like Elm.

Of course this means you have to deal with external JS throwing errors. I’m a fan of the ‘tryCatch’ functions from ‘fp-ts’ for handling things that might throw errors. I’m on mobile, but I’ll add some examples once I am on my computer.


Viewing all articles
Browse latest Browse all 2592

Trending Articles