Skip to content

Commit 64be87f

Browse files
committed
Add sample code for using ES7 Decorators
1 parent 1776dc4 commit 64be87f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,17 @@ const sortableOptions = {
113113
export default Sortable(sortableOptions)(MySortableList);
114114
```
115115

116+
You can also use HOCs as ES7 decorators:
117+
```js
118+
import React from 'react';
119+
import Sortable from 'react-sortablejs';
120+
121+
@Sortable({ ref: 'list', model: 'items' })
122+
export default class SortableList extends React.Component {
123+
...
124+
}
125+
```
126+
116127
## Examples
117128

118129
### Simple List

0 commit comments

Comments
 (0)