React, why use super(props) inside of ES6 class constructor? [duplicate]

家住魔仙堡 提交于 2019-11-28 18:26:55
jmancherje

super allows you to access the constructor method of the parent class. The only reason to include props is to access this.props inside of your constructor.

What's the difference between "super()" and "super(props)" in React when using es6 classes?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!