title: How to store fetched data in state and render it in my component
body: <p>I have fetched the array using the <code>graphql</code> query and stored it in a variable called <code>mpbrands</code>. Now I want to store it in the state and render it in my component. I tried the below but its not giving any response</p>
  <pre><code>constructor(props) {
          super(props)
          this.state = {
              count: 0
          }
      }     
  async componentDidMount(){
          let brandQuery = BrandPageInstance.getBrandList();
          await fetchQuery(brandQuery).then((mpbrand) =&gt; {
                  this.setState({
                      count: mpbrand.items
                  })
                  console.log(count)
              },
              (error) =&gt; console.log(error)
          )   
      }
  </code></pre>
  <p>In the console I am getting an error <code>Uncaught (in promise) ReferenceError: count is not defined </code>. My array structure is</p>
  <pre><code>mpbrand:
       items: Array(10)
               0: {default_value: &quot;CHEVROLET&quot;, image: &quot;image_url&quot;}
  </code></pre>
  <p>Let me know how to do it. Since I am newbie not able to store it in the <code>state</code></p>