WaspW
Wasp2y ago
Estelle

Using action in backend

Hello!

https://wasp-lang.dev/docs/data-model/operations/actions#declaring-actions
I see we can use action in the backend.
I want to do so to avoid code duplication.
How do you use the action in the backend? Do you have an example?
In the front I just import it from wasp/client/operations and it works like a charm.
But in backend I'm not really sure how to use it?
We'll explain what Actions are and how to use them. If you're looking for a detailed API specification, skip ahead to the API Reference.
Was this page helpful?