Does not work with Octane
See original GitHub issuerepro repo: https://github.com/NullVoxPopuli/octane-ember-concurrency-repro
npx ember-cli new my-app -b @ember/octane-app-blueprint --yarn
cd my-app
yarn ember install ember-concurrency
with the templtae:
<div {{did-insert (perform this.myTask)}}>
boop
</div>
import Component from '@glimmer/component';
import { task } from 'ember-concurrency';
export default class MyComponent extends Component {
@task myTask = function*() {
console.log('my task');
}
}
Uncaught (in promise) Error: Assertion Failed: The first argument passed to the `perform` helper should be a Task object (without quotes); you passed undefined
and then with ember-concurrency-decorators:
Uncaught (in promise) Error: Assertion Failed: @computed can only be used on empty fields. myTask has an initial value (e.g. `myTask = someValue`)
with this preferred syntax:
@task * myTask() {
console.log('my task');
}
we get a babel error:
✖ 1 problem (1 error, 0 warnings)
Build Error (broccoli-persistent-filter:Babel > [Babel: e-concurrency]) in e-concurrency/components/my-component.js
.../components/my-component.js: Unexpected token (6:19)
4 |
5 | export default class MyComponent extends Component {
> 6 | @task * myTask() {
| ^
7 | console.log('my task');
8 | }
9 |
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (7 by maintainers)
Top Results From Across the Web
Not working displacement in Octane for Cinema 4D - iRender
Ways of troubleshooting not working displacement in Octane · 1. Ensure it is plugged in · 2. Check the texture itself · 3....
Read more >Problem with Octane in C4D S24 - OTOY Forums • View topic
My problem is that, when I start the Cinema4d and i assign de the folder where the Demo of octane is, Cinema doesnt...
Read more >I have been having a problem with motion blur in C4D today ...
I have been having a problem with motion blur in C4D today - It renders in the Live Viewer but does not render...
Read more >Octane Render not working : r/Cinema4D - Reddit
Hey, I couldn't get octane to work with cinema 4D S24, it's not showing up at all. any help would be appreciated!
Read more >Glimmer Components - Octane Upgrade Guide - Ember Guides
Arguments. In classic components, arguments are assigned directly to the class instance. This has caused a lot of issues over the years, from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just adding to @muziejus comment… if you have a task that you use in multiple places:
looks like this is the current way to use generators with decorators: