简体   繁体   中英

What causes "Too many re-renders" error in React?

Many times this error is occurring in my project. When facing this error, I just delete my code. I'm not understanding why this error would happen.

Probably, the each render you are updating the state and it causes infinite re-render. We could help you if you will share your code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM