JSTQL-JS-Transform/output_testing/972error.modify-state-2.js

11 lines
188 B
JavaScript
Raw Normal View History

import { useState } from "react";
function Foo() {
const [state, setState] = {
foo: {
bar: 3
}
} |> useState(%);
const foo = state.foo;
foo.bar = 1;
return state;
}