9 lines
No EOL
266 B
JavaScript
9 lines
No EOL
266 B
JavaScript
// 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(%);
|
|
} |