cosmoC
Convex Community13mo ago
12 replies
cosmo

Why calling an action from a client is an anti-pattern?

When then is good to use an action from client?
If we need to write a mutation based on the response of a third party API, that's probably the unique case when we can call the action directly from the client?

Context: A note in the docs

Note: In most cases calling an action directly from a client is an anti-pattern. Instead, have the client call a mutation which captures the user intent by writing into the database and then schedules an action:
Was this page helpful?