Skip to content

Conversation

@flipvh
Copy link
Contributor

@flipvh flipvh commented Aug 6, 2025

No description provided.


//TODO (TanStackDB) make optimistic updates work offline
export const getAttachmentsCollection = (organizationId: string): Collection<LiveQueryAttachment> => {
export const getAttachmentsCollection = (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If create mutations through createTransaction ( to be able create hook for offline updates) get same err in usage of raw
const attachmentsCollection = getAttachmentsCollection(orgIdOrSlug)
I must add attachmentsCollection.startImidietSync()

// Effect to update total and selected rows when data changes
useEffect(() => setTotal(combined.length), [combined]);

//TODO (TanStackDB) make work with Strict mode
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't make it work proper in dev with strict mode, mb there is the better way to abort on offline and unmount for colletion?

const localAttachmentCollection = getLocalAttachmentsCollection(orgIdOrSlug);

//TODO (TanStackDB) reduse re-renders will fix (ERR_INSUFFICIENT_RESOURCES)
//TODO (TanStackDB) Add drop of sync on component unmount
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-renders re-trigger live query with sync, causes a lot of query fire up at the same time on initial load

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants