Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新手请教:两个页面(页面A,页面B),都require同一个store,如何同步更改、共享store.data呢? #133

Open
lidesheng111 opened this issue Dec 15, 2021 · 1 comment

Comments

@lidesheng111
Copy link

如题。是不是因为页面A和B,require的是store的两个不同实例,然后页面B更新的this.data,不能体现在页面A的this.data上,页面B跳转回页面A后,拿不到页面B获取的this.data数据。怎样让页面B更新的this.data,能被页面A对应的store获取呢?

@JohnieXu
Copy link

要么require同一个实例,要么使用eventChannel在页面B页面数据变更时主动通知A页面

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants