JSTQL-JS-Transform/output_testing/536useMemo-switch-no-fallthrough.js

15 lines
253 B
JavaScript
Raw Normal View History

function Component(props) {
const x = (() => {
switch (props.key) {
case "key":
{
return props.value;
}
default:
{
return props.defaultValue;
}
}
}) |> useMemo(%);
return x;
}