Firestore trigger function alternative in Convex?
I'm coming from Firestore where one of my favorite features is the ability to automatically trigger functions when documents are written. What's the closest thing to this in Convex?
Thanks!
5 Replies
If you make a reusable function for writing to a given table, running a function on document write is trivial. I have this behavior in place for most of my tables and it works really well.
yep, this is sort of the "ORM-trigger" method. many are using this right now
in addition to the (great) suggestion above, you can also use this now https://stack.convex.dev/triggers
Database Triggers
Triggers automatically run code whenever data in a table changes. A library in the convex-helpers npm package allows you to attach trigger functions t...
Nice!!