Sign in

ReScript

@rescript-lang.org
364 followers 31 following 70 posts

rescript-lang.org Ship great products!

PostsRepliesMedia
ReScript @rescript-lang.org · 29/12/2025
youtu.be/5sJ6cyk2XDA?... by @tranquillanathan.bsky.social
So it begins
130
ReScript @rescript-lang.org · 11/11/2025
In the next version of our vscode plugin 🚀: github.com/rescript-lan...
174
ReScript @rescript-lang.org · 03/05/2025
Yes, we might have too many binaries currently...
060
ReScript @rescript-lang.org · 03/05/2025
Next up we have a talk about the new build system, Rewatch by Jaap Frolich.
283
ReScript @rescript-lang.org · 03/05/2025
Even with a little code tour.
060
ReScript @rescript-lang.org · 03/05/2025
Good morning! We are currently kicking off this year's ReScript Retreat with a talk about editor tooling by @z-th.bsky.social and @nojaf.com.
2125
ReScript @rescript-lang.org · 20/03/2025
We just landed a new (experimental) feature for v12 - nested record definitions! Records is a corner stone in ReScript. However, they can't be nested without explicit definitions. Until now! Will be especially useful for deeply nested records (like options objects) not intended to be reused.
2245
ReScript @rescript-lang.org · 15/01/2025
One approach is using separate records for grouping related props, and then use record spreads to share them. Playground: rescript-lang.org/try?version=...
120
ReScript @rescript-lang.org · 13/01/2025
Records are powerful, but you need explicit definitions for them. We're experimenting with allowing inline record definitions nested inside a record type definition. This will make some of the common use cases for records more ergonomic.
1152
ReScript @rescript-lang.org · 04/01/2025
The new dot completion also works for objects. Objects are structurally typed, doesn't need a type definition, and are quite useful in some scenarios. Completion for object fields will be more ergonomic and get better discoverability with this addition.
0102
ReScript @rescript-lang.org · 03/01/2025
With the new dot completion enhancements in our editor tooling you'll now get completions from the Option module when autocompleting on a record field that's an optional value, instead of just no completions like before.
1163
ReScript @rescript-lang.org · 02/01/2025
You'll now also get pipe completions when you do dot completion on any type, not just records. And additionally, you can even configure per type to have the editor give completions from additional modules, not just the module it belongs to.
170
ReScript @rescript-lang.org · 02/01/2025
For newcomers, one of the differences to JS is using pipes where you'd normally use method chaining. This takes a bit of time to learn. To fix this, you now get pipe completions from dots as well. So the experience is like in JS, but an actual pipe is inserted on completion.
170
ReScript @rescript-lang.org · 03/12/2024
Type inference is simple but powerful. The compiler will infer each type that's unknown by usage. A consequence of this is that prop drilling is really simple, because you rarely have to annotate props. Just using the prop in the component defining it is usually enough.
0205
ReScript @rescript-lang.org · 29/11/2024
In ReScript, pipes are normally used for chaining fn calls instead of method chaining with dots like in JS. This is a common gotcha for JS/TS devs who come to ReScript. To ease the transition we're experimenting with letting the editor tooling complete pipes also via dots.
1216
ReScript @rescript-lang.org · 28/11/2024
In ReScript you can put expressions almost anywhere. Assign expressions to variables, put them anywhere in JSX, put them directly into function arguments, etc. Massive readability and productivity boosters, and you'll love it if you haven't written in a language with it before.
2145
ReScript @rescript-lang.org · 27/11/2024
Since v11, ReScript has support for explicit partial application of functions using the "..." syntax at the end of the function call. Partial application of functions is useful in many scenarios, and this explicit syntax makes code easier to read and reason about.
0226
ReScript @rescript-lang.org · 26/11/2024
Pipes are one of the most powerful concepts in ReScript. Pipes let you build function chains easily, with great support for type inference, and great editor support like autocomplete. It's just a syntax transform, so it compiles to regular, efficient JS function calls.
1188
ReScript @rescript-lang.org · 22/11/2024
ReScript has first class support for tagged template literals since v11.1. A useful JS technique that's important for interop, and lends itself well to some pretty interesting use cases!
0124
ReScript @rescript-lang.org · 21/11/2024
Dynamic imports shipped in ReScript v11. You can easily import both entire file modules, as well as single functions. For file modules, you simply await the module itself. For single functions, you use the `import` function. Makes things like React.lazy easy to use.
0134
ReScript @rescript-lang.org · 20/11/2024
JSX is a 1st class language feature in ReScript. Since v11.1 you've been able to use any createElement-style JSX transform you'd like with ReScript. Image shows Preact, but there are examples in the community even for non-client side fws, like emitting plain HTML server side.
2203
ReScript @rescript-lang.org · 19/11/2024
ReScript ships with native async/await support that also compiles to async/await in JavaScript. You can pattern match directly on the await, and handle errors in the pattern match as well. No need to wrap things manually in try/catch, the compiler still emits the right thing.
2266
ReScript @rescript-lang.org · 18/11/2024
We shipped a %todo extension point in v11.1. It makes it easy to postpone implementing something but not have the compiler block you continuing working. It'll produce a warning by default, and it's easy to configure the compiler so that it emits a hard error in for example CI.
1154
ReScript @rescript-lang.org · 14/11/2024
We'll ship our new standard library Core by default in v12. Core replaces the current standard lib and most of Belt, with one unified experienced that's built to look and feel more like the JavaScript APIs you're used to, while not sacrificing ergonomics.
0208
ReScript @rescript-lang.org · 13/11/2024
We're further closing the syntax gap between ReScript and JavaScript in in v12: - First class regex syntax (previously needed wrapping in %re("<pattern>")) - Remainder operator - Use +, -, / and * for any number type, dedicated operators per type not needed And more coming!
1246
ReScript @rescript-lang.org · 12/11/2024
Another new feature in v12 - variant type spreads in pattern matching! This allows you to refine variant types and easily match on a whole subset type without having to enumerate it. This was always possible with polyvariants, and now also with regular variants.
Code showing variants using type spreads in both type definitions and pattern matching.The generated JavaScript code for the previous ReScript code snippet.
0144
ReScript @rescript-lang.org · 11/11/2024
In v12, several new features come together to enable powerful new use cases. Dict pattern matching and with untagged variants make it easy to hand write JSON decoders/encoders with great DX, and also get efficient and readable JS output. More power, less complexity.
0136
ReScript @rescript-lang.org · 09/11/2024
Quite a few new useful features coming to ReScript in v12! For example, first class syntax and pattern matching for dicts! Dicts are an important tool when interoping with JS. Cristiano has also done massive work improving the efficiency of the emitted JS, which can be seen in the output here.
0285