摘要:
MyComponent.propTypes = { // You can declare that a prop is a specific JS primitive. By default, these // are all optional. optionalArray: React.PropT 阅读全文
摘要:
function vs method 函数(function)和方法(method)在编程中的概念就很相近,经常被互换着称呼, 但它们的区别主要是在定义的位置上。 从这段解释上看函数和方法基本一致,只是方法是属于对象的一部分, 所以在面向对象语言中才有概念。如果是C语句,就只有函数的说法。 方法是附 阅读全文
摘要:
By adding and to MessageList (the context provider), React passes the information down automatically and any component in the subtree (in this case, B 阅读全文