Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 766 Bytes

File metadata and controls

52 lines (40 loc) · 766 Bytes

Do not use async actions

Rule no-async-actions

Examples of incorrect code for this rule:

actions: {
  async handleClick() {
    // ...
  }
}
actions: {
  handleClick() {
    return something.then(() => { /* ... */ });
  }
}
@action
async handleClick() {
  // ...
}
@action
handleClick() {
  return something.then(() => { /* ... */ });
}

Examples of correct code for this rule:

actions: {
  handleClick() {
    return nothingOrSomethingThatIsNotAPromise;
  }
}

Further Reading