#Use helper functions or internalAction?
3 messages · Page 1 of 1 (latest)
Still wrapping my head around the convex best practices.
I'm guessing I should be avoiding Actions unless I NEED to use them is that right?
I would recommend calling a function directly when you can. This reduces overhead, since a new action would get a new javascript environment and serialize the args & return values. ctx.runAction is most helpful for switching between the convex runtime and node.js.
And you're right, actions should only be used when necessary. If you can do it in a mutation, that has even less overhead and better guarantees.