项目作者: teabyii

项目描述 :
Sortable List Component with React
高级语言: JavaScript
项目地址: git://github.com/teabyii/react-easy-sortable.git
创建时间: 2018-01-26T15:21:52Z
项目社区:https://github.com/teabyii/react-easy-sortable

开源协议:MIT License

下载


react-easy-sortable

Sortable list component with react that should be easy to use :tada::tada::tada:

npm version

Installation

Using npm:

  1. npm install react-easy-sortable --save

Usage

  1. import { SortableList, SortableItem } from 'react-easy-sortable'
  2. export default class SortableComponent {
  3. onSort (target, indexList) {
  4. // ...
  5. }
  6. render () {
  7. return (
  8. <SortableList onSort={this.onSort.bind(this)}>
  9. <SortableItem>
  10. Your Components
  11. </SortableItem>
  12. { /* ... */ }
  13. </SortableList>
  14. )
  15. }
  16. }

Using Webpack or other module bunlder to pack it.