Open
Description
What is the feature?
When doing something like drag and drop the updates to firestore take too long so the UI jumps. This is even worse with transactions.
What version would this apply to?
v0.15
Do you have thoughts/examples on how the feature would be used (i.e. API)?
Yes. I already forked it and made it work: Optimal-AI#1
// Single document change w/ synchronous, optimistic data in Redux
firestore.mutate({ collection: 'collection/path', doc: 'document-id', someChange: 'value' });
// Batch multiple document changes w/ synchronous, optimistic data in Redux
// (batches > 500 will be bundled and committed together)
firestore.mutate([
{ collection: 'collection/path', doc: 'document-id', someChange: 'value' },
{ collection: 'collection/path', doc: 'other-id', otherChange: 'otherValue' }
]);
// transactions w/ synchronous, optimistic data in Redux
firestore.mutate({
read: {
myLockedDocument: {
collection: 'path',
doc: 'document-id',
}
},
write: [({ myLockedDocument }) => ({
collection: 'path',
doc: 'document-id' ,
someNumber: myLockedDocument.someNumber + 10
})]
});
Metadata
Assignees
Labels
No labels
Activity