title: Using API Values as props to change State in React
body: <p>I'm using API Values primaryKey to change data represented on Click, but the function doesnt seem to work. and No Errors are thrown. I'm unable to find whats going wrong here.</p>
  <p>What I'm trying to do here is -  By default the table outputs multiple stocks with multiple columns for each ,  when clicked on button
  it should use the key value of that stock to represent only that single stock with its columns.
  Here is my part of the code:</p>
  <pre><code>    handleClick = (props) =&gt; {
          return (
              &lt;div&gt;
                  {this.state.data.filter(data =&gt; data.includes({props})).map(filteredData =&gt; (
                      &lt;li&gt;
                      {filteredData}
                      &lt;/li&gt;
              ))};
              &lt;/div&gt;
          );
      }
      renderArray = () =&gt; {
          return (
              &lt;table className=&quot;table&quot;&gt;
                  &lt;thead&gt;
                      &lt;tr&gt;
                          &lt;th&gt;Name&lt;/th&gt;
                          &lt;th&gt;Price&lt;/th&gt;
                          &lt;th&gt;Price/ Chng&lt;/th&gt;
                          &lt;th&gt;Mkt Cap&lt;/th&gt;
                          &lt;th&gt;Volume&lt;/th&gt;
                          &lt;th&gt;Turnover&lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;/thead&gt;
                  &lt;tbody&gt;
                      {this.state.data.map(item =&gt; {
                          return (
                              &lt;tr key={item.co_S}&gt;
                                  &lt;button onCLick={this.setState = () =&gt; this.handleClick(item.co_S)}&gt;&lt;td &gt;{item.co_N}&lt;/td&gt;&lt;/button&gt;
                                  &lt;td&gt;{item.price}&lt;/td&gt;
                                  &lt;td&gt;{item.p_chng_pc}&lt;/td&gt;
                                  &lt;td&gt;{item.Mkt_cap}&lt;/td&gt;
                                  &lt;td&gt;{item.volume}&lt;/td&gt;
                                  &lt;td&gt;{item.volume * item.price}&lt;/td&gt;
                              &lt;/tr&gt;
                          );
                      })};
                      
                  &lt;/tbody&gt;
              &lt;/table&gt;
          );
      }
      render() {
          return (
              &lt;this.renderArray /&gt;
          )
      }
  }
  
  export default StocksHomePage2;
  </code></pre>