Maximum Update Depth Exceeded
I am getting the following error (after the data is received from the dummy server) Maximum update depth exceeded. This can happen when a component repeatedly calls setState ins
Solution 1:
Your change to:
clicked={() => this.postClicked(el.id)})}
Fixes your issue, because instead of calling the function this.postClicked()
immediately, you are creating a new function which will only be called when needed.
Post a Comment for "Maximum Update Depth Exceeded"