Reordering list element in react js
问题 I am wondering how to re order a list element. Its like you have a list of an elements li and put the last element in the first place like the index of 10th would be placed in the index of 0 React.render( <div> <li>1</li> <li>2</li> <li>3</li> <li>4</li> //When an event fires, this item would go up to the first index </div>, document.getElementById('example') ); 回答1: Based on your comment on Abdennour answer (you need to update an item regardless of its position), you cannot do such operation