File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,16 @@ $ npm run dist
26
26
27
27
Then, include these scripts into your html file:
28
28
``` html
29
- <script src =" http://fb.me/react-0.14.7.js" ></script >
30
- <script src =" http://fb.me/react-dom-0.14.7.js" ></script >
31
- <script src =" http://cdnjs.cloudflare.com/ajax/libs/Sortable/1.4.2/Sortable.min.js" ></script >
32
- <script src =" dist/react-sortable.min.js" ></script >
29
+ <body >
30
+ <div id =" container" ></div >
31
+ <script src =" http://fb.me/react-0.14.7.js" ></script >
32
+ <script src =" http://fb.me/react-dom-0.14.7.js" ></script >
33
+ <script src =" http://cdnjs.cloudflare.com/ajax/libs/Sortable/1.4.2/Sortable.min.js" ></script >
34
+ <script src =" dist/react-sortable.min.js" ></script >
35
+ </body >
33
36
```
34
37
35
- Example :
38
+ A pure example without using JSX syntax :
36
39
``` js
37
40
var MySortable = React .createClass ({
38
41
displayName: ' MySortable' ,
@@ -49,8 +52,9 @@ var MySortable = React.createClass({
49
52
);
50
53
}
51
54
});
55
+
52
56
ReactDOM .render (
53
- React .createElement (SortableMixin .default ()(MySortable), null ),
57
+ React .createElement (SortableMixin .default ({ ref : ' list ' , model : ' items ' } )(MySortable), null ),
54
58
document .getElementById (' container' )
55
59
);
56
60
```
You can’t perform that action at this time.
0 commit comments