-
Notifications
You must be signed in to change notification settings - Fork 100
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
非global store互相引用时,报undefined错误 #98
Comments
似乎没有人关注这个问题 |
createModel corresponds to createGlobalStore in v2, so you need to batch replace createModel with createGlobalStore。see:https://hox.js.org/guide/how-to-migrate-from-v1-to-v2 @freewind |
这周我看下 @freewind |
@freewind 看你上面发的代码,Store1Provider 是套在 Store2Provider 外层的,那自然不能在 Store1 中去 不过 hox 的报错倒是可以优化一下,不能直接 undefined…… |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
复现repo: https://github.com/freewind-demos/typescript-react-hox-mix-stores-demo
useStore1.ts:
useStore2.ts
组件:
运行报错:
如果useStore1与useStore2都是
createGlobalStore
,则无错。看了一下源码tests,里面没有这里场景的测试
The text was updated successfully, but these errors were encountered: