feed
feed copied to clipboard
Feed items added asynchronously are not sorted by date
If my recordset is not sorted by descending date my feed is out of order. It would be nice if there was a sort before the render.
I noticed this behavior this when I added items to the feed from multiple async sources.
FWIW it's easy to add this yourself before render:
feed.items.sort((a, b) => b.date - a.date)
will do a reverse sort (newest to oldest). I could see potentially changing that sort if you had posts with an "original published date" and an "updated date" — perhaps you'd want to bubble the newly updated posts to the top.