JSTQL-JS-Transform/output_testing/455error.todo-unconditional-set-state-lambda.js

10 lines
249 B
JavaScript
Raw Normal View History

function Component(props) {
let y = 0;
const [x, setX] = 0 |> useState(%);
const foo = () => {
1 |> setX(%);
y = 1; // TODO: force foo's mutable range to extend, but ideally we can just remove this line
};
foo();
return [x, y];
}