title: How to display array data into tables in Reactjs
body: <p>I am trying to display csv file data to frontend in reactjs. i read csv file using papaparse and i am getting all data</p>
  
  <pre><code>["0.122584", "0.785882", "0.954039", "0.353008"]
  ...
  ...
  ["0.122584", "0.785882", "0.886715", "-0.626392"]
  </code></pre>
  
  <p>and want to to display this array data in the form of table.</p>
  
  <p>I tried this </p>
  
  <pre><code>class Panel extends React.Component {
    constructor(){
        super();
        this.state={
            csvfile:undefined,
            data:null
        };
  
    }
    handleChange = event =&gt;{
        this.setState({
            csvfile:event.target.files[0]
        });
    };
  
    importCSV = () =&gt;{
        const { csvfile } = this.state;
        Papa.parse(csvfile, {
            complete: this.updateData,
            header: false
        });
    };
  
    updateData(result){
        var data = result.data;
        console.log("&gt;&gt;&gt;&gt;&gt;")
        this.setState({
          data:data
        })
        console.log(data)
    }
  
  render(){
  return(
  &lt;Table bordered&gt;
                   &lt;thead&gt;
                   &lt;tr&gt;
                      &lt;th&gt;#&lt;/th&gt;
                       &lt;th&gt;First Name&lt;/th&gt;
                       &lt;th&gt;Last Name&lt;/th&gt;
                       &lt;th&gt;Username&lt;/th&gt;
                  &lt;/tr&gt;
                   &lt;/thead&gt;
                   &lt;tbody&gt;
                   &lt;tr&gt;
                       &lt;th scope="row"&gt;1&lt;/th&gt;
                       &lt;td&gt;{this.state.data}&lt;/td&gt;
                       &lt;td&gt;Otto&lt;/td&gt;
                       &lt;td&gt;@mdo&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;/tbody&gt;
               &lt;/Table&gt;
  )
  }
  </code></pre>
  
  <p>But it is not working well. it is displaying all data in single cell only.
  i want each value in different cell.
  I am a beginner in reactJs.</p>
  
  <p>Thanks.</p>