JSTQL-JS-Transform/output_testing/952block-scoping-switch-variable-scoping.js

26 lines
No EOL
478 B
JavaScript

import { useMemo } from "react";
function Component(props) {
const outerHandlers = (() => {
let handlers = {
value: props.value
};
switch (props.test) {
case true:
{
handlers.value |> console.log(%);
break;
}
default:
{}
}
return handlers;
}) |> useMemo(%);
return outerHandlers;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{
test: true,
value: "hello"
}]
};