How to design a search component data store using?

0 like 0 dislike
6 views
Did a search component that takes the data table and prints the appropriate fields.
There are ducks in the component model in which actions take place through the action creature in the Saga and from there updating the store.

Like component was good and versatile, but came to edit and it took using search to implement a change in other tables+ a few side effects.

Because the earlier sagas were not working did everything in a simple way. In the component sent the props from the parent and in componentDidUpdate after the change of the state caused some action of the parent, provided that they come.

But here's the problem page can be several such components and they are changing the state of one component to componentDidUpdate thinks has changed the state of both components, which is actually true store are one on everyone and actually update triggered on both components.
That fundamentally breaks the functionality.

May have any tips?
My back gut tells me is componentDidUpdate you can just SAG to monitor the implementation of action from the model SEARCH in a model parent, but the import action of SEARCH and call it via yeld take(...) yields no results.

Because a lot of Code, put it in a separate Gist
by | 6 views

1 Answer

0 like 0 dislike
I suspect that you have a store created outside of the constructor of the component, so it is common for a library, but not on the component instance, because the store is created when you do import.

1. To create a unique UID for each instance of the component. And redusere to write to state[uid]

2. To implement a wrapper component class and already in it to create a store and providit it.
by
110,608 questions
257,186 answers
0 comments
33,630 users