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