I've UNIX timestamps in a response and I'm sorting them as:
var sortedData = data.sort(function (x, y) {
return x.created - y.created
})
Here are some of the values of created
1612840160306
1612717863299
1612715819573
1612853308834
1612842118101
1612767742861
...
Then I'm passing the sortedData to a state which then re-renders as:
{userSortedData.map((data, index) =>
<MyTestCell
key={index}
name={data.personName}
phone={data.phone}
createdOn={data.created}
/>
)}
In my view, I can see that the first cell is assumed
And a cell below it is
Whereas it should be that the cell displaying Feb 7 date should be above Feb 6 but it's not.


data.sort((x, y) => y.created - x.created).