Hey Everyone - would love some input. I am trying to implement liveInfiniteQueries and have created the following live query as an example:
return useLiveInfiniteQuery(
(q) => {
if (label) {
return q
.from({ notes: notesCollection })
.where(({ notes }) => and(eq(notes.archived, false), eq(notes.deleted, false)))
.where(({ notes }) => inArray(label, notes.labels))
.orderBy(({ notes }) => notes.updated, "desc");
} else {
return q
.from({ notes: notesCollection })
.where(({ notes }) => and(eq(notes.archived, false), eq(notes.deleted, false)))
.orderBy(({ notes }) => notes.updated, "desc");
}
},
{
pageSize: MAX_PAGE_SIZE,
getNextPageParam: (lastPage, allPages) =>
lastPage.length === MAX_PAGE_SIZE ? allPages.length : undefined,
},
[label]
);
};```
Everything seems to work fine to start - I am able to jump between having labels, no labels, etc. However if I start updating any of the content the data stops updating and if I try to do an insert it flat out hangs the page - no error, eventually get a page unresponsive, you can't even close the active tab, and a message about code being hung. Everything works perfectly with just a regular live query. Any one else experience this? Am I missing something? I realize it's still in beta but I havent seen any issues logged that seem related to this.