[v3] transaction implemented?
I'm trying to update a post object in Firebase using a transaction, but i'm getting an error that transaction is not defined.
I looked in:
\react-native-firestack\lib\modules\database.js
but do not see any references to transactions, is this implemented?
Example code:
function toggleStar(postRef, uid) { postRef.transaction(function(post) { if (post) { if (post.stars && post.stars[uid]) { post.starCount--; post.stars[uid] = null; } else { post.starCount++; if (!post.stars) { post.stars = {}; } post.stars[uid] = true; } } return post; }); }
Good catch. We do not yet have transactions implemented.
Wanna make a PR? I can walk you through how to do it, if so. Otherwise, I'll see if I have time this weekend.
I took a look but I think this is a bit over my head, I'm not much of a java programmer. I definitely appreciate your help.
Also looking for this feature :)
Alright. I'll prioritize this. Shouldn't be too difficult to implement, I don't think.
Also looking for this feature. Any update on this?
Also looking for this feature, fix yet?