Cyril Auburtin 9 years ago
parent
commit
18d32b67ab
  1. 27
      README.md

27
README.md

@ -386,8 +386,8 @@ var SortableList = React.createClass({
render: function() { render: function() {
return <ul>{ return <ul>{
this.state.items.map(function (text) { this.state.items.map(function (text, i) {
return <li>{text}</li> return <li ref={i}>{text}</li>
}) })
}</ul> }</ul>
} }
@ -409,17 +409,18 @@ var AllUsers = React.createClass({
}, },
getInitialState: function() { getInitialState: function() {
return { users: ['Abbi', 'Adela', 'Bud', 'Cate', 'Davis', 'Eric']; }; return { users: ['Abbi', 'Adela', 'Bud', 'Cate', 'Davis', 'Eric'] };
}, },
render: function() { render: function() {
return ( return (<div>
<h1>Users</h1> <h1>Users</h1>
<ul ref="user">{ <ul ref="user">{
this.state.users.map(function (text) { this.state.users.map(function (text, i) {
return <li>{text}</li> return <li ref={i}>{text}</li>
}) })
}</ul> }</ul>
</div>
); );
} }
}); });
@ -429,13 +430,13 @@ var ApprovedUsers = React.createClass({
sortableOptions: { group: "shared" }, sortableOptions: { group: "shared" },
getInitialState: function() { getInitialState: function() {
return { items: ['Hal', 'Judy']; }; return { items: ['Hal', 'Judy'] };
}, },
render: function() { render: function() {
return <ul>{ return <ul>{
this.state.items.map(function (text) { this.state.items.map(function (text, i) {
return <li>{text}</li> return <li ref={i}>{text}</li>
}) })
}</ul> }</ul>
} }

Loading…
Cancel
Save