teaset
teaset copied to clipboard
react-redux support for Overlay
As Overlay introduces TopView as the new top element, the react-redux connect call won't find Provider element for any customised Overlay views added to TopView.
One easy (but not ideal) solution is to manually assign store to each of the Overlay views.
Is there a better solution for this?
I did not use react-redux, so it did not support react-redux in Teaset. It may be better to provide a "assignStore" method in TopView, but I need to verify that it takes a little time.
Thanks for looking into it. Really love your work. Thought it would be more popular with better redux support. Also wondering which library you used with teaset
in terms of state management for your own projects?
I'd like to now if this will be implemented. Thanks for your efforts.
请问有什么好的解决方法吗
还好有老外,提过问了,虽然很尴尬。。。
我瞎写了一通。。。好像可以,但不知道会不会有问题。。。 首先,在App.js 给 <Provider> 赋值store之前,就先在willMount中 global.store = store. 然后把这个global.store给"Provider"用。 然后,其他teaset的组件要用redux的地方,显示赋值 store = {global.store}. 最后,connect ,就可以用了。。。。
You can global.store =store before assgin store to "Provider" Then assign global.stote to any component in OveaLay you want to use redux. Finally, You connect the component in OverLay. @t83714 @zhuanglong
我瞎写了一通。。。好像可以,但不知道会不会有问题。。。 首先,在App.js 给 赋值store之前,就先在willMount中 global.store = store. 然后把这个global.store给"Provider"用。 然后,其他teaset的组件要用redux的地方,显示赋值 store = {global.store}. 最后,connect ,就可以用了。。。。
You can global.store =store before assgin store to "Provider" Then assign global.stote to any component in OveaLay you want to use redux. Finally, You connect the component in OverLay. @t83714 @zhuanglong
react-native:0.61.5 按所描述方法添加store无效 @supermanxiacheng 是否可以提供下具体代码 🙏