title: How to use an arrow function inside an Array.map() function with react
body: <p>I have used the map function all over my react application but always passing in an actual declared method. I am currently playing around trying to get an inline arrow function to work as a repeater. Here is the code I'm trying to run inside my render function:</p>
  
  <pre><code>    &lt;DropdownButton id='some-id' title={this.state.myId}&gt;
          {Object.keys(this.state.EMPTPS).map(
              k =&gt; (
                  &lt;Dropdown.Item key={k} eventKey={k}&gt;{this.state.EMPTPS[k]}&lt;/Dropdown.Item&gt;
              )
          )}
      &lt;/DropdownButton&gt;
  </code></pre>
  
  <p>So I'm trying to iterate over a set of keys of an object I've created in my state declaration, and use the values as the button value and the keys as the eventKey, and key. Here is my object in state:</p>
  
  <pre><code>    EMPTPS: {
          'KEY1': 'Value1',
          'KEY2': 'Value2',
          'KEY3': 'Value3'
      }
  </code></pre>
  
  <p>Whenever this code runs, I get the 'Element type invalid' error from react, so obviously something isn't right here. I'm sure (and hope) it's just a simple syntax error on my part, but seeing as how I am still fairly fresh on ES6 and react in general, help would be much appreciated.</p>