title: In React, is it possible to alter state inside of the map method, and if not what is an alternative?
body: <p>I'm creating a calendar with 30 day squares for the month of April.</p>
  <pre><code>this.state = {
       myArray: [1, 2, ...30],
       count: 1
       };
  
  render () {
      return &lt;div&gt;{this.state.myArray.map(() =&gt; (
          &lt;div className='daySquare'&gt;{this.state.count}&lt;/div&gt;  
          //is it possible to increment count here?
      ))}&lt;/div&gt;
  </code></pre>
  <p>How would I increment count so I can display the date number for each daySquare for the month of April?</p>
  <p>PS. I know using myArray is weird, but I'm brand new to React, and this is the best way I could think to make daySquares. If there's a better way I'd love to hear it!</p>