To render array elements in reverse order efficiently with React, we use the JavaScript array reverse
method to reverse our array.
For instance, we write
[...this.props.myList].reverse().map(createListItem);
to call reverse
on myList
after making a copy of it with the spread operator.
Then we call map
with the createListItem
function which renders the item we want.