为了账号安全,请及时绑定邮箱和手机立即绑定

this.props_

请问 const { age, ...otherProps } = this.props_   这个this.props_和 this.props 有什么区别?  一般是用 this.props吧?

正在回答

2 回答

故意敲_的,this.props_会报错

0 回复 有任何疑惑可以回复我~

你自己敲一下试试就知道了,我们公司自己写的高阶组件就是用this.prop,没有那个下划线的

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
React高级教程之高阶组件
  • 参与学习       14485    人
  • 解答问题       33    个

运用高阶组件编写高质量React应用

进入课程
意见反馈 帮助中心 APP下载
官方微信