Skip to content

[v3] transaction implemented? #78

Open
@tegument

Description

@tegument

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; }); }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions