title: How do I get data set from a tr element
body: <p>I was working on my react project and I put an <code>onClick</code> function and dataset to my <code>&lt;tr&gt;</code> element like this</p>
  <pre><code>&lt;tr key={index} onClick={ev} data-ti={ddd.id} className={classs}&gt;
  </code></pre>
  <p>and so in that <code>ev</code> function I tried to get the value from the dataset like this</p>
  <pre><code>function ev(e){
  
      const {ti} = e.target.dataset
  
     console.log(ti) // returns undefined
  }
  </code></pre>
  <p>and instead of returning an id it returns <code>undefined</code> am I doing something wrong or maybe there's another way of doing it</p>