Created
October 4, 2019 23:59
-
-
Save tomdale/ed53b7435777c6ba46b84062043553db to your computer and use it in GitHub Desktop.
bind vs. action decorators
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component, { tracked, action } from '@glimmer/component'; | |
export default class extends Component { | |
@tracked count = 0; | |
@action increment() { | |
this.count++; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component, { tracked } from '@glimmer/component'; | |
import { bind } from 'decko'; | |
export default class extends Component { | |
@tracked count = 0; | |
@bind increment() { | |
this.count++; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment