摘要: 核心API 想要灵活使用,就先知道几个核心API DragSource 用于包装你需要拖动的组件,使组件能够被拖拽(make it draggable) DropTarget 用于包装接收拖拽元素的组件,使组件能够放置(dropped on it) DragDropContex 用于包装拖拽根组件, 阅读全文
posted @ 2019-04-30 18:58 adoctors 阅读(4025) 评论(0) 推荐(0) 编辑
摘要: 前言 先说说 提起React.PureComponent,我们还要从一个生命周期函数 shouldComponentUpdate 说起,从函数名字我们就能看出来,这个函数是用来控制 组件是否应该被更新 的。 React.PureComponent 通过prop和state的 来实现shouldCom 阅读全文
posted @ 2019-04-30 18:58 adoctors 阅读(530) 评论(0) 推荐(0) 编辑