npm.io
0.1.1 • Published 8 years ago

react-easy-sortable

Licence
MIT
Version
0.1.1
Deps
0
Size
254 kB
Vulns
0
Weekly
0
Stars
2

react-easy-sortable

Sortable list component with react that should be easy to use npm version

Installation

Using npm:

npm install react-easy-sortable --save

Usage

import { SortableList, SortableItem } from 'react-easy-sortable'

export default class SortableComponent {
  onSort (target, indexList) {
    // ...
  }

  render () {
    return (
      <SortableList onSort={this.onSort.bind(this)}>
        <SortableItem>
          Your Components
        </SortableItem>
        { /* ... */ }
      </SortableList>
    )
  }
}

Using Webpack or other module bunlder to pack it.

Keywords