Skip to content

Commit 99923b5

Browse files
Simplify arrow function syntax for handlers (#309)
1 parent abfc840 commit 99923b5

File tree

1 file changed

+3
-3
lines changed
  • content/4-component-composition/2-emit-to-parent/emberPolaris

1 file changed

+3
-3
lines changed

content/4-component-composition/2-emit-to-parent/emberPolaris/app.gjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import AnswerButton from "./answer-button";
55
export default class App extends Component {
66
@tracked isHappy = true;
77

8-
handleYes = () => (this.isHappy = true);
9-
handleNo = () => (this.isHappy = false);
8+
handleYes = () => this.isHappy = true;
9+
handleNo = () => this.isHappy = false;
1010

1111
<template>
1212
<p>Are you happy?</p>
1313
<AnswerButton @onYes={{this.handleYes}} @onNo={{this.handleNo}} />
1414
<p style="font-size: 50px;">{{if this.isHappy "😀" "😥"}}</p>
1515
</template>
16-
}
16+
}

0 commit comments

Comments
 (0)