teaset icon indicating copy to clipboard operation
teaset copied to clipboard

react-redux support for Overlay

Open t83714 opened this issue 6 years ago • 7 comments

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?

t83714 avatar Jul 24 '17 11:07 t83714

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.

rilyu avatar Jul 25 '17 06:07 rilyu

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?

t83714 avatar Jul 25 '17 10:07 t83714

I'd like to now if this will be implemented. Thanks for your efforts.

ozgurrgul avatar Mar 13 '18 14:03 ozgurrgul

请问有什么好的解决方法吗

zhuanglong avatar Mar 18 '18 08:03 zhuanglong

还好有老外,提过问了,虽然很尴尬。。。

supermanxiacheng avatar May 07 '18 07:05 supermanxiacheng

我瞎写了一通。。。好像可以,但不知道会不会有问题。。。 首先,在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

supermanxiacheng avatar May 07 '18 07:05 supermanxiacheng

我瞎写了一通。。。好像可以,但不知道会不会有问题。。。 首先,在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 是否可以提供下具体代码 🙏

isllyend avatar Apr 04 '20 13:04 isllyend