I have this function that sorts dates in ascendent order (from the first date to the last date), I'm using immutableJS https://facebook.github.io/immutable-js/docs/#/Map/sortBy :
export const OrderedMapSelector = (state) => {
if ( state.allRetrospectivesMap ) {
return state.allRetrospectivesMap.sortBy((retro) => retro.get('date'))
} else {
return Map({})
}
}
I want to sort it by descendent order, from the last date to the first date. How can I do this?
Thanks :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.