salsita / prism

React / Redux action composition made simple http://salsita.github.io/prism/
496 stars 24 forks source link

How to pass data to childcomponents or child-redux-elm-modules #47

Closed namjul closed 7 years ago

namjul commented 7 years ago

Since using redux-elm at work i am still struggling with some situations concerning data retrieval for childcomponents.

One is how to pass data to deep nested childcomponents. The concept of containers in redux with which you have access to the whole store at any nested level does not really work for redux-elm (technically it would work). So how would i solve a situation where i need to pass props down the hierachy, without passing it down manualy. Using React Context would be a solution.

Another problem is with related/required data. tomkis1 metioned a entityrepository which is included in every model of redux-elm moduls which subscribe to it. So every redux-elm module can access all entities and retrieve needed entities. But this would not solve all use case, because if required data is not an entity (like selected date) i would still have to pass in down as props.

appreciate any thoughts.