title: How to use props in React Native?
body: <p>I am new to React Native. I am wondering how to use props to work my code? Here is my code.</p>
  <pre><code>const weatherConditions = {
  
    Rain: {
      color: '#005BEA',
    },
    Clear: {
      color: '#f7b733',
    }
  };
  
  const Weather = ({ weather }) =&gt; {
      return (
        &lt;View
          style={[
              styles.weatherContainer,
              { backgroundColor: weatherConditions.weather.color }
          ]}/&gt;
      );
  };
  </code></pre>
  <p>But it does not work. Only the code below works. How to fix this? Help me.</p>
  <pre><code>const Weather = ({ weather }) =&gt; {
  
      return (
        &lt;View
          style={[
              styles.weatherContainer,
              { backgroundColor: weatherConditions.Rain.color } // or { backgroundColor: weatherConditions.Clear.color }
          ]}
        &gt;
      );
  };
  </code></pre>