📜  反应原生 setstate 对象 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:32.590000             🧑  作者: Mango

代码示例2
this.state = {
   jasper: { name: 'jasper', age: 28 },
}

this.setState({
    jasper: {
          ...this.state.jasper,
          name: 'something'
    }
})