@Enterpub wrote:
How to call function inside another action and get its return value in component's "actions" hook? For example,
// components/some-comeponent.jsactions: { action1() { const value = this.send("action2", 40); console.log(value); }, action2(someNumber) { return someNumber / 2; } }
the output of executing of "action1" function is going to be undefined. I search for a solution, which outputs 20.
Thank you
Posts: 1
Participants: 1