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

Webapi and input files

Also note that there is an ongoing effort to replace webapi… ya that’s why I was just gonna raw js it lol. I just wanted to make sure I wasn’t missing something from the current Webapi. Thank you...

View Article


Image may be NSFW.
Clik here to view.

Trying to remove Caml_option in the generated JS

Excellent ! Thank you very much On the side note, I wrote this little library in TS first and wanted to rewrite in ReScript to see if it helps (I have many years of OCaml coding and am doing TS for...

View Article


Trying to remove Caml_option in the generated JS

I want to frame that post, thanks for the feedback!

View Article

Using Rescript with Preact?

I’m using ReScript 11.1+ and just started a project through create-rescript-app but I want to switch to Preact over React but not sure where to start yet. Anyone have an example or guidance?

View Article

[ANN] New module function page

Module functions are super useful for me. Every base type like int and string gets wrapped in a more descriptive type like FirstName, PositiveInteger, USD, Milliseconds, ShortString, EmailAddress,...

View Article


[ANN] New module function page

(post deleted by author)

View Article

Using Rescript with Preact?

I have bindings here in my Fresh repo for Preact: rescript-fresh/bindings/Preact.res at main · jderochervlk/rescript-fresh · GitHub You can copy those over to your project and set the JSX module to...

View Article

How to create a record value from a subtype record value?

The spread operator works only on record type creation, but not on record value creation. This works: type foo = {x: int, y: int} type bar = {...foo, z: int} But this is not supported: let foo = {x:...

View Article


Image may be NSFW.
Clik here to view.

Using Rescript with Preact?

Thanks! Last night I stumbled upon GitHub - ajaxsys/rescript-preact: Test rescript with preact which covered the changes I needed to make and has similar bindings to yours (maybe they borrowed it from...

View Article


Using Rescript with Preact?

It’s older than my work, so they didn’t copy from me, but it’s a similar process so the results should be similar. I’ve been using my own bindings for Signals, but this exists and might work for you:...

View Article

Image may be NSFW.
Clik here to view.

Using Rescript with Preact?

My mistake, should have checked the timestamps. Probably wouldn’t hurt for me to compare against yours and see if anything is different. As for Signals, I did see that but it seemed aimed at a react...

View Article

Using Rescript with Preact?

You could indeed use either a mutable field or a @set binding to create a setter function, just use whatever feels the more natural!

View Article

Using Rescript with Preact?

I 100% prefer to write my own bindings. I also feel like it helps me understand the source library better, and I get to come up with a solution that matches how I want to use it. Here’s what I have...

View Article


I'm working on some bindings for a Remix app and I could use some help with a...

This is all kinda moot now that React Router 7 is out. I plan on revisiting this soon.

View Article

Welcome to the ReScript Forum

thank you for sharing this post.

View Article


Image may be NSFW.
Clik here to view.

How to create a record value from a subtype record value?

Yes, you cannot safely spread here. That only works when bar’s own fields are all optional. type foo = {x: int, y: int} type bar = {...foo, z?: int} let foo = {x: 1, y: 2} let bar: bar = {...foo, z:...

View Article

Using Rescript with Preact?

Totally fair! I got the mutable version working, but figured it wouldn’t hurt to have a get and set function to play nicely with the chaining → operator. I did get those working with: @set external...

View Article


Need API advice for a little TS & ReScript library

Hello, hello, I create a little state management library (in the mindset of Overmind.js which I enjoyed a lot) but am stuck with a some design decisions regarding TS / ReScript. A familiar API for...

View Article

Need API advice for a little TS & ReScript library

One way to do it is with @genType.as: // Libname.res @genType.as("libname") let make = ... @genType.as("useLibname") let use = ... Bear in mind that that @genType.as feature is deprecated because in...

View Article

JsxDOMStyle.t lacks some properties

When setting inline style, I found JsxDOMStyle.t lacks some properties like aspectRatio, scrollbarBehavior. Currently I add those properties by %raw.

View Article
Browsing all 1751 articles
Browse latest View live