Introducing ReScript at Work

In Elm, the trick that seems to consistently work is just build 1 component in Elm. All frameworks like React, Angular, Svelte, Vue, etc. all can use components. This a low risk way for teams to “accept the new kid” and eventually fall in love.

What’s the equivalent technique for ReScript in the Node.js world? I know many love ReScript in React, but my primarily use case & responsibilities are massive amounts of Node.js written in CommonJS by many OOP or imperative programmers who are fine with no exception handling, async await, and long methods (the tests however are quite thorough). They’re also heavily in a Server/Docker environment vs a Serverless which is even worse as they’re ok with stateful things.

1 Like

ReScript is of course compatible with plain old JS in Node.js, but maybe the easiest approach would be to implement tricky pure logic in a ReScript module and use that from JS modules. E.g., something that takes advantage of ReScript variants and pattern matching to guarantee all cases of a logic are handled. I like this example from @johnj : Building Coronate: type-driven development and scorekeeping - DEV Community

1 Like

hi, note ReScript is not tied to React, it is that we have built-in support for react. But you certainly could use ReScript with any other popular framework.
ReScript’s role is more like typescript, it allows user to adopt it incrementally