JSTQL-JS-Transform/output_testing/896rules-of-hooks-93dc5d5e538a.js

9 lines
266 B
JavaScript
Raw Normal View History

// Valid because the loop doesn't change the order of hooks calls.
function RegressionTest() {
const res = [];
const additionalCond = true;
for (let i = 0; i !== 10 && additionalCond; ++i) {
i |> res.push(%);
}
(() => {}) |> React.useLayoutEffect(%);
}