We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c799ba1 commit 2fc6d8fCopy full SHA for 2fc6d8f
jscomp/syntax/tests/ppx/react/asyncAwait.res
@@ -0,0 +1,7 @@
1
+let f = a => Js.Promise.resolve(a + a)
2
+
3
+@react.component
4
+let make = async (~a) => {
5
+ let a = await f(a)
6
+ <div> {React.int(a)} </div>
7
+}
jscomp/syntax/tests/ppx/react/expected/asyncAwait.res.txt
@@ -0,0 +1,12 @@
+type props<'a> = {a: 'a}
+let make = ({a, _}: props<_>) => {
+ ReactDOM.jsx("div", {children: ?ReactDOM.someElement({React.int(a)})})
8
+let make = {
9
+ let \"AsyncAwait" = (props: props<_>) => make(props)
10
11
+ \"AsyncAwait"
12
0 commit comments