Guest User

Untitled

a guest
Feb 17th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. export class Increment {
  2. static readonly type = '[Increment]: description';
  3. }
  4.  
  5. @State<number>({
  6. name: 'count',
  7. defaults: 0
  8. })
  9. export class CountState {
  10. @Action(Add)
  11. public increment({ getState, setState }) {
  12. const state = getState();
  13. setState(state + 1);
  14. }
  15. }
Add Comment
Please, Sign In to add comment