什么鬼视频剪切的好明显
瞬间跳转
connect
什么鬼呀A(B)
直接 return class component
PPT & script
Camtasia Studio
app.css
.App { text-align: center; } *{ margin: 0; padding: 0; list-style-type: none; border: none; } .a-container{ min-height: 500px; width: 300px; border: 1px solid #f60; } .a-container .header{ height: 30px; line-height: 30px; position: relative; color: #fff; } .a-container .header .title{ width: 100%; background: #f60; text-align: left; text-indent: 10px; } .a-container .header .close{ position: absolute; right: 10px; top: 0; }
多个组件都需要某个相同的功能,使用高阶组件减少重复实现
高阶组件就是接受一个组件作为参数并返回一个新组件的函数。 高阶组件不是组件,是一个函数。
写一个函数 然后return一个组件,之后在这个组件中嵌入(作为参数传入)一个子组件,复合成一个高阶组件
高阶组件:是个函数,该函数接受一个组件作为参数并返回一个新组件
1.高阶组件
2. 列
为什么需要