wip
This commit is contained in:
18
stores/counterStore.ts
Normal file
18
stores/counterStore.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
// stores/counterStore.ts
|
||||
import { makeAutoObservable } from "mobx";
|
||||
|
||||
export class CounterStore {
|
||||
count = 0;
|
||||
|
||||
constructor() {
|
||||
makeAutoObservable(this);
|
||||
}
|
||||
|
||||
increment() {
|
||||
this.count += 1;
|
||||
}
|
||||
|
||||
decrement() {
|
||||
this.count -= 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user