Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export class Increment {
- static readonly type = '[Increment]: description';
- }
- @State<number>({
- name: 'count',
- defaults: 0
- })
- export class CountState {
- @Action(Add)
- public increment({ getState, setState }) {
- const state = getState();
- setState(state + 1);
- }
- }
Add Comment
Please, Sign In to add comment