Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 7 additions & 41 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 13 additions & 11 deletions ppx/test/react.t
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ Demonstrate how to use the React JSX PPX

function X$App(Props) {
return Belt__Belt_List.toArray(Belt__Belt_List.map({
hd: "Hello!",
tl: {
hd: "This is React!",
tl: /* [] */0
}
}, (function (greeting) {
return JsxRuntime.jsx("h1", {
children: greeting
});
})));
hd: "Hello!",
tl: {
hd: "This is React!",
tl: /* [] */ 0
}
}, (function (greeting) {
return JsxRuntime.jsx("h1", {
children: greeting
});
})));
}

const App = {
Expand All @@ -60,5 +60,7 @@ Demonstrate how to use the React JSX PPX

JsxRuntime.jsx(X$App, {});

exports.App = App;
module.exports = {
App,
}
/* Not a pure module */
16 changes: 10 additions & 6 deletions test/blackbox-tests/useCallback.t
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@
const React = require("react");

const cb = React.useCallback((function (a, b) {
return a + b | 0;
}), []);
return a + b | 0;
}), []);

exports.cb = cb;
module.exports = {
cb,
}
/* cb Not a pure module */

Using an Uncurried function:
Expand All @@ -45,9 +47,11 @@ Using an Uncurried function:
const React = require("react");

const cb = React.useCallback((function (a, b) {
return a + b | 0;
}), []);
return a + b | 0;
}), []);

exports.cb = cb;
module.exports = {
cb,
}
/* cb Not a pure module */

Loading