Skip to content
Discussion options

You must be logged in to vote

Ok, mixing getters and state can achieve this, why i didn't realize it before... Something like this:

  const order = ref('asc');
  const listQuery = computed(() => {
    return query(notesRef, orderBy('created_at', order.value));
  });
  const list = useCollection<Note>(listQuery, {
    ssrKey: 'notes'
  });

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Blinks44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant