title: Passing props to sub components Reactjs
body: <p>Say I have a main component which uses 2 sub components and i want to pass a styling object prop to those sub components. Is there a way of passing those props without passing them directly to the main component since those props are not directly assosiated with the main component but rather the sub components.</p>
  
  <pre><code>&lt;MainComponent subComponentStyling={} /&gt;
  </code></pre>
  
  <p>I reckon I'd be able to do this where I pass the sub components down as children:</p>
  
  <pre><code>&lt;MainComponent&gt;
   &lt;SubComponent1 style={} /&gt;
   &lt;SubComponent1  style={} /&gt;
  &lt;/MainComponent&gt;
  </code></pre>
  
  <p>On the other hand those two sub components are tightly connected to main component since I will always pass multiple props from the main component to the sub components, so I can't really do the above since the functionality that I want to pass down exists in the main component. </p>
  
  <p>Do I have to create a render prop and pass stuff down through that or is it more convient to pass the styling props down to main component and from main component to the sub component?</p>
  
  <p>I'm newbie at react so I probably missed something basic.</p>