Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sort function in react js

this.state.data.sort((a, b) => a.timeM > b.timeM ? 1:-1).map(
    (item, i) => <div key={i}> {item.matchID} {item.timeM} {item.description}</div>
)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sort #function #react #js
ADD COMMENT
Topic
Name
7+3 =