Skip to content

Commit b75ad31

Browse files
authored
Update README.md
1 parent 17d15c6 commit b75ad31

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ Then, include these scripts into your html file:
4242
</body>
4343
```
4444

45+
Use <b>&lt;ReactSortable /&gt;</b> instead of <b>&lt;Sortable /&gt;</b> in your JSX code since the Sortable library will export a <b>window.Sortable</b> object if you're running JSX code directly in the browser. For example:
46+
```jsx
47+
<ReactSortable
48+
tag="ul"
49+
onChange={(order) =>
50+
this.props.onChange(order);
51+
}}
52+
>
53+
{items}
54+
</ReactSortable>
55+
```
56+
4557
## Usage
4658
File: sortable-list.jsx
4759
```jsx

0 commit comments

Comments
 (0)