|
|
|
|
|
by mrpadie
1594 days ago
|
|
We tried ReScript 2 years ago at work when it was still in its infancy, and still named ReasonML. Besides many other gripes at the time, one of the biggest pain points was the lack of any async/await support, and a very cumbersome Promise wrapper. Unfortunately, it looks like not much has changed[0], and you’re still forced into writing the equivalent of unwieldy Promise chains. I ended up migrating us onto Typescript, which was a great move for us. The seamless interop with JavaScript combined with the massively active community makes it a no-brainer over other attempts at strongly-typed JS, IMO. [0] https://rescript-lang.org/docs/manual/latest/promise |
|
That said, I get that there's callbacks for everything and that you can do I/O with callbacks but it's not fun and if that is your only option you're going to need some external Flux "store" to manage all your state.
Edit: I should also add that I understand that there are people who find the async/await paradigm to be bad but I don't think we have much of an alternative when it comes to JavaScript or if you want an alternative, we'll then you are hardcore enough to be fine with just callbacks.