Why can’t you call this.setState from within the render method?

PHOTO EMBED

Mon Jun 20 2022 12:02:21 GMT+0000 (Coordinated Universal Time)

Saved by @mehran1801 #react.js

this.setState automatically calls render, so it would create infinite loop.
content_copyCOPY