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

What keep you guys using Rescript?

$
0
0

Hi, I am in the process of rewriting a F# + Fable + Feliz + Preact app with ReScript.

ReScript’s onboarding was not frictionless. I started with create-rescript-app. Using pnpm, I first encountered a rescript-vscode extension issue that was fixed a few days later. The .mjs files polluting the src directory were not appealing at all. Configuring the ReScript output to generate them in the lib directory created issues with paths. Fortunately I discovered vite-plugin-typescript that solved all of this.
Once these dev tools were finally set, I started playing with the code. I first thought .resi files were mandatory. It was a deal breaker for me. Having function signatures separated from their implementation is a total nonsense, even with the minor benefits of making compilation faster and documentation easier.
I was relieved to learn that .resi files were actually optional, and that you can use %%private to hide some functions of a module. I was surprised to see that setting a screaming case variable like let SNACKBAR_TIMEOUT = 5_000 produced a cryptic “variant constuctor not found” error. Compiler errors could be more explicit.

That is my experience so far. I wrote it down so ReScript people can see what new users like me are experiencing, and hopefully make things smoother.

Cheers,
Laurent


Viewing all articles
Browse latest Browse all 2592

Trending Articles