Theoretically, I know that the state's changes in the hook setState
are aggregated, i.e if I'll call it multiple times in the same function, the state's changes will be collected, and then the state will be changed only once.
Is this is the case for this.setState
in React's Component class as well?
For example, if I would want to add multiple calls to this.setState
on componentDidMount?
Thanks.