Why I Like Using ReScript for Frontend Work
I didn’t start using ReScript because I wanted another language.
I started using it because I wanted fewer frontend bugs without slowing down development.
JavaScript is flexible, but that flexibility often shows up as runtime issues, unclear contracts, and fragile refactors. ReScript pushes many of those problems earlier — at compile time — while still feeling familiar if you’ve worked with React.
What ReScript Actually Is
ReScript is a strongly typed language that compiles to clean, readable JavaScript.
A few important things to know:
- Strong static typing
- Very fast compiler
- Clear, human-readable error messages
- First-class support for React
- Predictable JavaScript output
It doesn’t try to be clever. It tries to be safe and practical.
Types That Actually Help
One of the biggest wins in ReScript is how types guide your thinking instead of getting in your way.
Instead of defensive checks everywhere, you model your data clearly.
1type status =
2 | Loading
3 | Success(string)
4 | Error(string)Now your UI must handle every possible case:
1type status =
2 | Loading
3 | Success(string)
4 | Error(string)No forgotten states. No undefined behavior sneaking into production.
Interop with JavaScript
ReScript doesn’t pretend JavaScript doesn’t exist.
You can call JavaScript libraries directly and incrementally adopt ReScript inside an existing React codebase.
Example binding:
1@module("uuid")
2external v4: unit => string = "v4"That’s all you need.
No wrappers.
No ceremony.
Why I Reach for ReScript
I like ReScript when I want:
- Confidence during refactors
- Clear and enforced data models
- Fewer runtime surprises
- Strong typing without heavy syntax
It works especially well for:
- Frontend-heavy applications
- Shared UI libraries
- Teams tired of TypeScript edge cases
When I Wouldn’t Use It
ReScript isn’t always the right tool.
I usually avoid it when:
- The team has no interest in typed functional concepts
- The project is very small or short-lived
- The ecosystem depends heavily on TypeScript-only tooling
Like any language, it works best when the problem fits.
Final Thoughts
ReScript doesn’t try to replace JavaScript culture — it improves it.
You still write React.
You still ship fast.
You just catch more problems before users do.
For me, that tradeoff is worth it.
If you’re curious, try converting a single component or utility first. That’s usually enough to see whether it clicks.