Closed Salman-Sali closed 12 months ago
You should never call a setter in a render function. Without seeing the full component I'm guessing that setRows()
is a react managed state function. Calling it here will cause an infinite loop.
You should instead create a child success component that takes rows as a prop and do any mutations and filtering in there.
This is my code.
console.log(rows);
keeps on going. Is this by design or is it supposed to stop the loop on success?