envyE
Convex Community3mo ago
6 replies
envy

Convex Mutation & Action Chaining

Guys I would like to create a function that checks if the user has a stripeID in the db, if not create a stripeID and store it in the db.

After use the ID to add a new card to the users account.

I've attached the code below given I am not sure if I am following the best practices.

Also how do I handle loading state in the frontend? Would the loading state only be for the first mutation or the whole chain?

Here isthe code: https://pastebin.com/Y5exEf3a

Please help me understand this a little better.
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Was this page helpful?