Skip to content

Commit 20fff87

Browse files
author
谢明
committed
feat: 监听store改变刷新页面
1 parent 3e5e263 commit 20fff87

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

nodemon.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"verbose": true,
33
"ignore": ["node_modules", ".next"],
4-
"watch": ["server/**/*", "server.js"],
4+
"watch": [
5+
"server.js",
6+
"store/"
7+
],
58
"ext": "js json"
6-
}
9+
}

store/appStore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {observable, action} from 'mobx';
22

33
class AppSore {
4-
@observable name = 'Mobx子页面';
4+
@observable name = 'Mobx子页面 66';
55
@observable day = '20';
66
@action.bound log() {
77
console.log('mobx');

0 commit comments

Comments
 (0)