DEV Community

Discussion on: Why Do We Use this.setState()?

Collapse
joetex profile image
Joel Ruiz • Edited on

Also setState under the covers uses Object.assign which let's you use partial objects like {a:10} while this.state has {b:20}. this.state would end up with {a:10, b:20}.