New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
有無加上constructor的差異 #28
Comments
(1) (2)
官方的說明也有解釋為什麼要這樣做,可以參考看看: |
@b12031106 感謝協助~:) @kuolun 感謝您的提問 (1) 關於 React ES6 class constructor super() 解釋可以參考 React ES6 class constructor super() 。 (2) 希望對你有幫助,謝謝:) |
感謝兩位的回覆,我研究研究那些參考連結內容先 |
@kuolun 不會~那我先 close issue 囉,有問題再 reopen ,謝謝~ |
hi 2個問題想請問一下
(1)
在Ch03/reactjs-introduction.md這邊有提到
ES6 Class component中render是唯一必須的方法
在Ch04/props-state-introduction.md
使用 ES6 Class Component 寫法這邊
有用到constructor
是否如果沒有用到state的話,可以不用寫constructor?
(2)
Ch04/react-component-life-cycle.md
Component 生命週期展示那段code中
this.handleClick = this.handleClick.bind(this);
可以稍微說明一下為什麼需要這行呢?
謝謝
The text was updated successfully, but these errors were encountered: