Skip to content

Demo to show compilation error when calling a hook specifically after a for of loop that contains an if - else statement. This seems to be a bug in compilation

Notifications You must be signed in to change notification settings

tory37/create-react-app-compilation-error

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project was bootstrapped with Create React App.

To see compilation error, run npm start.

Error: React Hook "useEffect" is called conditionally. React Hooks must be called in the exact same order in every component render. Did you accidentally call a React Hook after an early return?

This seems to happen specifically when calling a hook after a for - of loop that contains a if - else statement. All other configurations shown do not throw the compilation error.

About

Demo to show compilation error when calling a hook specifically after a for of loop that contains an if - else statement. This seems to be a bug in compilation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published