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

[ANN] ReScript Retreat Roadmap Summary 2024

In v12+ there won’t be a way to write code in ml that compiles in uncurried mode, since most of uncurried mode is at handled by wrapping things in the AST with constructs that can’t be expressed in...

View Article


[ANN] ReScript Retreat Roadmap Summary 2024

The code that I need to “duplicate” is indeed a pain in the ass, since are both 2k files from Css and CssJs definitions: styled-ppx/packages/css/js/Css_Js_Core.ml at main · davesnx/styled-ppx · GitHub...

View Article


Track Side Effects

Just in general- not in React or anything- is there a way to keep track effectful functions, like in Haskell?

View Article

Track Side Effects

No, rescript type system comes from ocaml, which is in general more pragmatic than haskell when it comes to use inpure code, so there’s no tracking of this.

View Article

[ANN] ReScript Retreat Roadmap Summary 2024

Uncurried mode actually isn’t the same as the old uncurry semantics, it’s another thing entirely. As an example, internally in uncurried mode each function is wrapped in a variant constructor...

View Article


[ANN] ReScript Retreat Roadmap Summary 2024

Got it, will see what are the paths forward. Thanks @zth

View Article

[ANN] ReScript Retreat Roadmap Summary 2024

Maybe there’s an older rescript version that can reprint ml as res. You can reprint Reason syntax in older versions but I’m unsure about ml, maybe that works too. If so I think just reprinting your...

View Article

Nameof operator

Does ReScript have the concept of a nameof operator? Example in F#: Nameof - F# | Microsoft Learn Something that can print the current value or field name of a symbol. I’m my code I need to do...

View Article


Nameof operator

There’s no such operator in rescript. You can build a runtime helper for this using proxy: await orderSnapshot->update_field(o => o.isProcessed, true) Where o is a proxy used to track which...

View Article


Nameof operator

What would that proxy look like?

View Article

[ANN] ReScript editor tooling version 1.52.0 is out

We’re happy to announce the release of 1.52.0 of the ReScript editor tooling. This release brings many bug fixes and stability improvements, as well as some new features. You can see the entire...

View Article

Image may be NSFW.
Clik here to view.

Nameof operator

I’m talking about javascript proxy with get trap MDN Web Docs Proxy - JavaScript | MDN The Proxy object enables you to create a proxy for another object, which can intercept and redefine fundamental...

View Article

Rescript Vite project with insource: false

If you really want "insource": false, take a look here: https://github.com/jihchi/vite-plugin-rescript?tab=readme-ov-file#using-loader. The loader functionality of this vite plugin was made to tackle...

View Article


Proposal: Kawaii logo

ReScript, is a noun by itself, so the prefix ‘Re’ shouldn’t be translated as 再 (which is also Re- of course, but It’s like retry, or reproduce) I guess. I thought the ‘Re’ comes from ReasonML, not the...

View Article

Proposal: Kawaii logo

Thanks, I’ve updated the GitHub issue.

View Article


[ANN] ReScript editor tooling version 1.52.0 is out

How exactly does * Add support for the rewatch build system for incremental compilation. #965 work? When I run rewatch watch in a terminal, will the tooling just pick up on that?

View Article

Static component properties in React

Hello, I want to use CLI - React Email and I’m wondering how I would write a binding for export default function Email(props) { return ( <div> <a src={props.source}>click here if you want...

View Article


Nameof operator

So something along these lines: const handler = { get: function (target, property, receiver) { return property; }, }; let nameof = (instance, getProperty) => { const p = new Proxy(instance,...

View Article

Static component properties in React

I guess the closest you can do is writing a binding with a @get attribute to the make function. I’ll write it down as soon as I’m back on my computer.

View Article

Image may be NSFW.
Clik here to view.

Static component properties in React

Here’s an approach using %raw: module Email = { @react.component let make = (~source) => { <div> <a src={source}> {React.string("click here if you want candy 👀")} </a>...

View Article
Browsing all 2602 articles
Browse latest View live