this.props_

来源:4-1 代理方式的高阶组件(上)

_3333

2019-06-27 22:59

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

写回答 关注

2回答

  • azmake
    2019-11-28 17:35:35

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

  • 慕粉3760244
    2019-06-29 23:43:01

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

React高级教程之高阶组件

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

14486 学习 · 33 问题

查看课程

相似问题