Skip to content

Commit

Permalink
Add test (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer committed Nov 1, 2021
1 parent 89bdc8c commit 1c94461
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class MyComponent extends Component {
}
```

Note - If you decorate a function with the `@action` decorator, you will lost the derived state. `@statefulFunction` will bind `this` for you. As a result, `@statefulFunction` replaces `@action` while giving you all the features of this addon!
`@statefulFunction` replaces `@action` while giving you all the features of this addon!


### Stateful Promise
Expand Down
1 change: 1 addition & 0 deletions tests/dummy/app/components/playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default class PlaygroundComponent extends Component {
@statefulFunction
async hammerMe() {
await timeout(this, 1000);
await this.clickMe();

return 'done';
}
Expand Down

0 comments on commit 1c94461

Please sign in to comment.