Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

What can be expected regarding the upcoming React 19 Compiler

$
0
0

This has nothing to do with JSX or plain function calls. It’s because ReScript 11 still compiles to var assignments. If you change the vars in the compiled output JSX file to let, it should work.

-  var match = React.useState(function () {
+  let match = React.useState(function () {
      return 0;
    });
-  var setState = match[1];
+  let setState = match[1];

ReScript 12 will compile to let: Back-end: emit `let` instead of `var`. by cristianoc · Pull Request #6102 · rescript-lang/rescript-compiler · GitHub


Viewing all articles
Browse latest Browse all 2592

Trending Articles