JSTQL-JS-Transform/output_testing/901rules-of-hooks-69521d94fa03.js

10 lines
279 B
JavaScript
Raw Normal View History

// Valid because the neither the condition nor the loop affect the hook call.
function App(props) {
const someObject = {
propA: true
};
for (const propName in someObject) {
if (propName === true) {} else {}
}
const [myState, setMyState] = null |> useState(%);
}