title: How to pass one state value to another state on initialization in react js
body: <p>I am trying to pass one state value that is imagesArray to another state that is tabData, but it is coming as undefined, PFB the code, please tell what i am doing wrong here?</p>
  
  <pre><code>constructor(props) {
      super(props);
      this.state = {          
          imagesArray: [
              {
                  default: '/images/volImage1.png',
                  active: 'images/volImage1.png'
              },
              {
                  default: '/images/volImage2.png',
                  active: 'images/volImage2-Active.png'
              },
              {
                  default: '/images/volImage3.png',
                  active: 'images/volImage3.png'
              },
              {
                  default: '/images/volImage4.png',
                  active: 'images/volImage4.png'
              },
              {
                  default: '/images/volImage5678.png',
                  active: 'images/volImage5678.png'
              },
          ],
          tabData: [
              {
                  title: 'Knowledge and experience',
                  content: &lt;VolunteerTabContent1 imagesArray={this.state.imagesArray} /&gt; 
                  //Here I am passing above imagesArray state, and this is coming as undefined and throwing error
              },
              {
                  title: 'Practical and hands on',
                  content: 'Tab 2 Content'
              },
              {
                  title: 'Management and leadership',
                  content: 'Tab 3 Content'
              },
          ]
  
      }
  }
  </code></pre>