Quantcast
Channel: ReScript Forum - Latest posts
Browsing all 1848 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Allow using `...` operator to shallow copy a record without rewrite any fields

Mng12345: But the need for shallow copying a record by using ... in ts/js is very normal and useful, i think we can add this into Rescript! I’d argue that it’s not very normal or useful. If you use...

View Article


Allow using `...` operator to shallow copy a record without rewrite any fields

I like the current behavior and this warning. It helps avoid doing something that isn’t needed that has an impact on performance.

View Article


Ergonomic bindings to database drivers are so frustrating

agreed this is a good solution… however, you have to immediately use query3(…) and cant put layers between, afaik, for example, what I have now is super simple bindings layer @unboxed type paramTypes...

View Article

Rescript Compiler as OCaml Library

Hey everyone. Wanted to know how can i install rescript-compiler as a library in my OCaml project? I found a rescript-syntax documentation which says it has some APIs to get the parsetree for a...

View Article

Rescript Compiler as OCaml Library

Just vendor the parts you need. as an example, have a look at the rescript-vscode repo: https://github.com/rescript-lang/rescript-vscode/tree/master/analysis/vendor Note: The rescript-syntax is...

View Article


Image may be NSFW.
Clik here to view.

Experience with the integration of Tailwind UI components with ReScript

Does anybody have personal experience with the integration of Tailwind UI components with ReScript? tailwindui.com Documentation Beautiful UI components and templates by the creators of Tailwind CSS....

View Article

Experience with the integration of Tailwind UI components with ReScript

I’ve used them extensively together. Works well. A little bit of conversion between JS/TS and ReScript needed, and occasionally some bindings, but other than that it’s been working great.

View Article

Nextjs next/font support incompatibility, thoughts?

Working on an app with nextjs, app router, I just added support for Google fonts via next/font support as suggested in the documentation. (I also have tailwind, but that’s beside the point here). I...

View Article


Using React server/client components with Rescript (React 18/NextJS 13)

Some time passed in the thread, so just to note my best practice here: In client code, in particular on the threshold when I switch from server component to client component, I use @@directive("'use...

View Article


Image may be NSFW.
Clik here to view.

The big migration thread for ReScript v11 (and uncurried mode)

I have an opaque type that I want to create an immutable set for. In order to do that in a type safe manner I’ve defined a module type for Belt.Set (since one isn’t provided out-of-the-box). This...

View Article

The big migration thread for ReScript v11 (and uncurried mode)

An even simpler example demonstrating the same problem, with a different error: let f: array<int> => Belt.Set.Int.t = Belt.Set.Int.fromArray yields: [E] Line 1, column 38: This function is a...

View Article

The big migration thread for ReScript v11 (and uncurried mode)

You need to wrap it manually with another function and it’ll work: ReScript Playground This has to do with uncurried mode being able to compile external dependencies as either curried or uncurried,...

View Article

The big migration thread for ReScript v11 (and uncurried mode)

Hmm, OK. Probably easier to vendor the whole thing then, since it’s quite a few functions. Thanks for the quick response!

View Article


The big migration thread for ReScript v11 (and uncurried mode)

Yeah simply vendoring the module should mean you don’t need to make any changes at all, since it can be compiled in uncurried mode directly if that’s the mode that’s configured in your project. So...

View Article

Image may be NSFW.
Clik here to view.

WIP - @jvlk/rescript-future - Functional Futures for ReScript

I usually stay away from directly interacting with Promises or async/await syntax and use Futures or Tasks instead. In JS/TS land I use fluture or fp-ts for this. There are bindings for libraries that...

View Article


Using React server/client components with Rescript (React 18/NextJS 13)

yes, i definitely like this idea better than pure ‘use client’/‘use server’ directives. Especially, since they are implementation dependent. I’ve seen $dollarprefix, i’ve seen dollarsuffix$, i’ve seen...

View Article

WIP - @jvlk/rescript-future - Functional Futures for ReScript

I’m happy with the API and error handling so far. Now I am looking into a way to cancel a Future.

View Article


Trouble migrating decco to rescript11

Hello there, I have converted reason files in decco to rescript using rescript@9 convertor. Now since decco uses ppx to create decoders&encoders for types. with new rescript11 I"m getting this...

View Article

Trouble migrating decco to rescript11

I think you should migrate to GitHub - green-labs/ppx_spice: ReScript PPX which generates the JSON (de)serializers, since that one is the spiritual successor of decco for ReScript. Never used it...

View Article

WIP - @jvlk/rescript-future - Functional Futures for ReScript

Did you check GitHub - bloodyowl/rescript-future: Cancellable futures for ReScript? It has cancellation. Other than that, great work! We definitely need more of those v11-ready packages. Maybe we need...

View Article
Browsing all 1848 articles
Browse latest View live