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

How to make module implement multiple signatures

This works: module MyModule: MySignature = { ... } But how can I make MyModule to implement MySignature1 and MySignature2? I know that in practice there might be signature fields conflicting between...

View Article


How to make module implement multiple signatures

You can use include when defining types. It is useful for more mathy designs, like bastet/bastet/src/Interface.ml at master · Risto-Stevcev/bastet · GitHub module type A = { type a } module type B = {...

View Article


Leverage ES decorators

As you can see from the proposal, it’s just a (high-order) function.

View Article

Syntax for unwrapping Option inside function

Pattern matching is possible today. type t = | A(int) | B(int) ... let A(x) | B(x) = A(1) The problem is that there is no way to handle unmatched patterns without early return semantics. For example...

View Article

Syntax for unwrapping Option inside function

Is there any docs about this syntax? Never seen it before and curious where it’s useful

View Article


Image may be NSFW.
Clik here to view.

Syntax for unwrapping Option inside function

It is inherited from OCaml like any other grammars. I can’t find the documentation, basically destructuring in ReScript/Rust is another form of the pattern matching. It is useful when dealing with...

View Article

Does ReScript still have any ties to Meta?

So, just curious, but does ReScript still have any connection to Meta? It is my understanding that they at some point they did something with a precursor or ReScript. I wonder if there still is...

View Article

Does ReScript still have any ties to Meta?

Not anymore, we are fully community-driven. At least there is not a single maintainer working at Meta. And of that list, I believe only @cristianoc at some point worked for Meta. The creator of...

View Article


Image may be NSFW.
Clik here to view.

How to Create a Custom React Component with ReScript?

Hey guys… I have been following the official documentation and some tutorials, but I am a bit stuck on how to create and manage custom React components in ReScript. Here is what I’m trying to achieve:...

View Article


Image may be NSFW.
Clik here to view.

How to use Custom Components as Props in rescript

@herepax183 I want to create a reusable React component using ReScript that accepts props and renders some JSX you can try this How to use Custom Components as Props in rescript For generic...

View Article

How to Create a Custom React Component with ReScript?

Hi there, Did you read Components and Props | React? If so, what part didn’t click for you?

View Article

JS API to compile ReScript to JS

I’ve tried adding this to Svelte like so: import { svelte, vitePreprocess } from "@sveltejs/vite-plugin-svelte"; import { exec } from "node:child_process"; import { readFileSync } from "node:fs";...

View Article

JS API to compile ReScript to JS

You’re close! You need to add each folder that can contain ReScript files to the bsc command via -I and pointing to the source folder, but in lib/bs. So if I have a folder called src/bindings in my...

View Article


JS API to compile ReScript to JS

@kamov I find this very interesting! Is your code available on GitHub?

View Article

Image may be NSFW.
Clik here to view.

[Help wanted] Improving "Somewhere wanted" error messages

Slowly getting back to this again, here improving the error messages when pattern matching on options/non-options, and vice versa: Match on option, but is not option Match on value, but is actually...

View Article


Image may be NSFW.
Clik here to view.

JS API to compile ReScript to JS

I’ve uploaded the current code on GitHub, it’s just the Vite starter with Svelte added instead of React, feel free to take a look. GitHub GitHub - kamoshi/svelte-rescript-sample: Svelte + ReScript...

View Article

JS API to compile ReScript to JS

I think this is a very interesting project, and I wonder what it’d take to make this experience nice. Looking forward to following what you come up with.

View Article


Why are the bindings for most libraries outdated?

First of all, I really like rescript’s type system and speed. I’m a beginner to FP and Rescript. I am worried that many libraries like rescript-express, rescript-next don’t have any commits for the...

View Article

Why are the bindings for most libraries outdated?

GitHub - DZakh/rescript-rest: 😴 ReScript RPC-like client, contract, and server implementation for a pure REST API has fastify bindings which is a good alternative for rescript-express. Also, I’m going...

View Article

Why are the bindings for most libraries outdated?

Thanks @DZakh. This is helpful. How do you work with db in rescript ?

View Article
Browsing all 1969 articles
Browse latest View live