如何写代码

时间:2021-08-24 16:57:21   收藏:0   阅读:8
如果这样设置state
this.state = { a: 1, b: {} }this.state = { a: 1, b: {} }

 

那么如何读取这些东西
let { a, b: { sth1 = 0, sth2 = 0 }={} } = this.state;

 

原文:https://www.cnblogs.com/sexintercourse/p/15180094.html

评论(0)
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!