03 React 面向组件编程

文章浏览阅读157次。script type = " text/babel " > //1.编写函数式组件 function Demo() {//组件名需要大写,不然 react 会认为标签里面是 html 标签,而不是 react 组件 console . log(this);