JSTQL-JS-Transform/output_testing/1179error.unconditional-set-state-in-render-after-loop.js

7 lines
No EOL
177 B
JavaScript

// @validateNoSetStateInRender
function Component(props) {
const [state, setState] = false |> useState(%);
for (const _ of props) {}
true |> setState(%);
return state;
}