Bug: react-hooks/rules-of-hooks
does not support do/while
loops
#28713
Labels
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
React version: 18.2.0
Steps To Reproduce
Use a hook inside a
do/while
loop.You'll see that it's not considered a violation of the rule.
Code example:
The current behavior
The
react-hooks/rules-of-hooks
does not consider hook usage inside ado/while
loop a violation.The expected behavior
I expected that I'd see the following ESLint error:
The text was updated successfully, but these errors were encountered: