Interoperability with BlitzJS?

Hey all first post! :grinning:

I’ve watched a few YT videos about Rescript and I’m really excited about it.

I see there is a Nextjs template with Rescript by @ryyppy. But I was wondering about BlitzJS.

About Blitz: it’s a fullstack framework based off NextJS, but comes with a form lib, prisma and auth capability out of the box. All backed by typescript. The DX experience is awesome and my own productivity through the roof and I’m really happy with it. :rocket:

What would it take to be able to use Rescript with BlitzJS? I would love to see if I could increase my productivity by using Rescript.

Many thanks :+1:

What would it take to be able to use Rescript with BlitzJS?

Yes. ReScript is designed to run everywhere JS can be run, it allows fine grained interaction with JS libs. Let me know if you have any concrete questions

Thanks for the reply.

I’m coming at Rescript with no real knowledge of it’s inner workings and my time is constrained.

I’m not going to do a deep dive for some time. So I’m looking for a general understanding of the scope of any work ahead.

Do I need to create bindings for any of the packages for BlitzJS? As it is Typescript first.

From the front-page:

First Class Typescript Support

Blitz is built with Typescript and the Blitz data layer is fully end-to-end typesafe. All types are completely static without needing a separate type generation process!

It’s very hard to give you any kind of estimation because most of our community members are not familiar with this framework.

What I can tell for sure is that ReScript will have troubles with filesystem specific conventions, because every filename in the codebase must be unique, so you’ll need a bunch of js files forwarding ReScript exports I guess. At least that’s currently the case for plain NextJS.

Also, it seems like Blitz is generating TS code from models? So you will almost certainly need to mix TS and ReScript and create a lot of interop code… hard to tell how much work that is to fit things together.

For a start I guess one would use the rescript-nextjs-template Next.res bindings to create some individual pages / react components. Not sure how complex the server parts will be, since there’s a bunch of technologies mashed together.


Many thanks for the detailed reply. Thanks for satisfying my curiosity. :+1:

Definitely hyped about Rescript. Will be watching it over the next year or so. :grinning:

Any templates out there with compiler that just works to get things done?