title: Best Practice for retrieving the data-attribute value in React
body: <p>I have a question about React Syntax. 
  <br>
  I was conceptualising a rebuild of my website in React and was writing code to access the <code>data-attribute</code> value.</p>
  
  <p>The method I used to get the <code>data-attribute</code> value was:<br>
  <code>e.target.getAttribute('data-menuItem');</code> </p>
  
  <p>and that seemed to work just fine. Upon further investigation I read about the alternative notation for the same method looks like:<br>
  <code>e.target.attributes.getNamedItem('data-menuItem').value</code></p>
  
  <p>I would just like to know if the second method I mentioned is best practice or if it really matters at all. </p>
  
  <p>Your help is much appreciated.
  Thanks<br>
  Moe</p>