本篇文章主要介绍react-beautiful-dnd
,它是基于react
的拖拽插件
接下来会从以下几个方面来介绍react-beautiful-dnd
- 安装使用
- API介绍
- Example
1. 安装使用
首先我们需要安装react-beautiful-dnd
# yarn
yarn add react-beautiful-dnd
# npm
npm install react-beautiful-dnd --save
使用时:
import { DragDropContext } from 'react-beautiful-dnd';