I have a React container which collects data, then passes it (and props) to a React component and so on. How do I get props from the higher level container/components into lower level container/components:

In this example, I have a locale field in the records of the UsersExtraColl collection that I want passing all the way down to the ListTable component:

Thanks sashko. It kinda feels like React should facilitate an easy way to pass properties down the component tree. I haven’t done much reading arounf Flux annd sotres, but do you know if they would server this purpose?

Does the second fetch cause significant inefficientices/slowness if this method is scaled up?

I haven’t done much reading arounf Flux annd sotres, but do you know if they would server this purpose?

I think the idea of flux is to do the data fetching in the container where you need it, so my suggestion of doing another query is actually exactly the most fluxy way to do it. In the flux model you never pass callbacks up and down the tree, you just put the data in a global store (minimongo) and query where you need it (the container).

I’m upgrading a react app to the containers approach and have run into the same problem. I have to replace getChildContext with an approach where context chains to descendants. I was curious how you resolved it.

I ended up using <MyComponent {…this.props} />. I started off using React clone element thiny, but simply re-structure my app to not use it in the end. I realised that props passed through the createContainer block reach the destination component, so you can use <MyComponent {…this.props} /> to pass the props down into child components.