![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
挠破头也想不出名字
这个作者很懒,什么都没留下…
展开
-
react学习日记
1.组件信息的传递, 函数组件用props,类组件在render用this.props在constructor需要在super(props) 2.组件通信的三种方式 2.1 父传子 1.父组件提供要传递的state数据 2.给子组件标签添加属性为state中的数据 //父组件 class Parent extends React.Component { state = { lastName: '王', } render() { return ( <div cla原创 2021-07-31 13:44:11 · 49 阅读 · 0 评论 -
React学习日记
学习成果: 1.如何创建组件 :函数组件和类组件,即无状态组件和有状态组件 2.组件在调用函数时的指针问题解决 :使用箭头函数 或使用匿名函数时需要绑定指针 3.如何渲染和绑定事件:使用name和value属性进行搭配 4.如何循环表单:使用.map(item =>(这里写入表单结构,如li标签))映射 5.如何使用结构赋值搭配使用 :[{id:xxx,name:xxx,content:xxx},…comments] 6.使用setState()方法更新state 7.组件渲染:ReactDOM.re原创 2021-07-29 03:11:06 · 172 阅读 · 0 评论