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

在app.js里的onLaunch里调用store.update()报错 #58

Open
dutedehuai opened this issue Nov 29, 2018 · 8 comments
Open

在app.js里的onLaunch里调用store.update()报错 #58

dutedehuai opened this issue Nov 29, 2018 · 8 comments

Comments

@dutedehuai
Copy link

image

报以下错误
image

@dutedehuai
Copy link
Author

setTimeout没问题

@zlj130137
Copy link

一样的问题

@Chen-Sanjia
Copy link

Chen-Sanjia commented Dec 6, 2018

onLaunch的时候还没执行create,store上还没有update函数

@JaimeCheng
Copy link

一样的问题

@jhd124
Copy link

jhd124 commented Dec 18, 2018

你可以去看store.js导出的对象里根本没有update这个方法的,这个方法是在第一个套了create的页面初始化了才被挂上去的,所以加了个timeout就没问题,直接调用就报错。
看得出来腾讯这个项目有点儿闹着玩的意思,虽然idea是好的,但是想在真正的产品里用这个东西还是得自己fork一份改改,好在代码不长

@dntzhang
Copy link
Collaborator

fork改改之后记得 pr啊

@dntzhang
Copy link
Collaborator

@DeyiXu
Copy link

DeyiXu commented Apr 8, 2020

mark,2020-04-08 18:18:49

直接写不好使,必须写在setTimeout里面
https://github.com/Tencent/westore/blob/master/packages/westore/app.js#L18-L22

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

7 participants