import Component from '@glimmer/component'; import { inject as service } from '@ember/service'; import { task } from 'ember-concurrency'; import { action } from "@ember/object"; export default class RecipeAddComponent extends Component { @service store; @(task(function * () { return yield this.store.queryRecord('meal', 'random'); })) fetchRecipe; @action async addRecipe() { await this.fetchRecipe.perform(); } }