I am currently facing a challenge in my project where I am utilizing VueJS, Firebase and VueFire. The specific issue at hand is arranging a list of posts from newest to oldest.
Even though I have attempted using Firebase's predefined queries like list.orderByChild('date')
, I have not been successful in achieving the desired outcome.
I understand that I need to implement
Array.sort((a,b) => { return new Date(a.date) - new Date(b.date) })
but I am struggling with integrating it effectively with VueFire, as well as creating a Vue filter for it.
If there are any additional details I can provide to assist you in helping me, please let me know.
This is the structure of my Database:
Below is the snippet of my code: