Skip to content

Commit 6a7a7c3

Browse files
Adapt to comments
1 parent 75bcff2 commit 6a7a7c3

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

_blogposts/2024-02-01-release-11-1.mdx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ description: |
88
Unleashing ReScript from React
99
---
1010

11-
A couple of weeks ago, the ReScript team released ReScript 11.0, which laid ground work for a lot of possible improvements to make it easier to interact with the JavaScript ecosystem. It also came with a lot of breaking changes, unfortunately.
11+
A couple of weeks ago, the ReScript team released ReScript 11.0, which laid ground work for a lot of possible improvements to make it easier to interact with the JavaScript ecosystem.
1212

13-
Good news, this next minor release has none of them. Instead we have some wonderful additions to the ReScript toolbelt for you today.
13+
This next minor has some wonderful additions to the ReScript toolbelt for you today.
1414

1515
To install, use your favorite package manager to install the new compiler release, e.g:
1616

@@ -30,6 +30,8 @@ This release comes with support for [tagged templates](https://developer.mozilla
3030

3131
A tag function in JavaScript is a function that expects an array of strings and variadic parameters as input. Now it's possibe to bind to such functions with the new [`@taggedTemplate`](/syntax-lookup#taggedTemplate-decorator) decorator:
3232

33+
<CodeTab labels={["ReScript", "JS Output"]}>
34+
3335
```rescript
3436
// see https://bun.sh/docs/runtime/shell
3537
type result = {exitCode: int}
@@ -39,6 +41,16 @@ external sh: (array<string>, array<string>) => promise<result> = "$"
3941
let filename = "index.res"
4042
let result = await sh`ls ${filename}`
4143
```
44+
```js
45+
var $$Bun = require("bun");
46+
47+
var filename = "index.res";
48+
49+
var result = await $$Bun.$`ls ${filename}`;
50+
```
51+
52+
</CodeTab>
53+
4254

4355
Of course you can also create your own tag functions in ReScript now as well, it is just a function with the following signature.
4456

@@ -86,7 +98,7 @@ let moreAnimals = [...animals, "🐔", "🐴", "🐮"]
8698
8799
## Hyphens in JSX tag names
88100
89-
We lifted restrictions on JSX tag names. This means you no longer need to use the [illegal identifier syntax](/docs/manual/latest/use-illegal-identifier-names) to use tag names that contain hyphens:
101+
We lifted restrictions on JSX tag names. This means you no longer need to escape tag names that contain hyphens:
90102
91103
Previously:
92104
@@ -99,14 +111,14 @@ Now:
99111

100112
```rescript
101113
let x = <custom-tag />
102-
let y= <Foo.custom-tag />
114+
let y = <Foo.custom-tag />
103115
```
104116

105117
## Acknowledgements
106118

107119
Once again we want to thank everyone from the community who volunteered their precious time to support this project with contributions of any kind, from documentation, to PRs, to discussions in the forum. But especially we want to thank the following people, who helped landing this release:
108120

109-
[cknitt](https://github.com/cknitt), [@cometkim](https://github.com/cometkim), [@cristianoc](https://github.com/cristianoc), [@diogomqbm](https://github.com/diogomqbm), [@kevinbarabash](https://github.com/kevinbarabash), [@shulhi](https://github.com/shulhi), [@tsnobip](https://github.com/tsnobip), [@zth](https://github.com/zth).
121+
[@cknitt](https://github.com/cknitt), [@cometkim](https://github.com/cometkim), [@cristianoc](https://github.com/cristianoc), [@diogomqbm](https://github.com/diogomqbm), [@kevinbarabash](https://github.com/kevinbarabash), [@shulhi](https://github.com/shulhi), [@tsnobip](https://github.com/tsnobip), [@zth](https://github.com/zth).
110122

111123
## That's it
112124

0 commit comments

Comments
 (0)