title: How to render array of object in ReactJS
body: <p>I want to get list of users using <code>reactJS 15.5</code>, Code:</p>
  
  <pre><code> constructor(props) {
     super(props);
          this.state = {
              values: []
          };
          this.getDataFromUser = this.getDataFromUser.bind(this);
      }
  
   render() {
          return (
              &lt;div&gt;
                  &lt;button onClick={this.getDataFromUser}&gt;Fetch&lt;/button&gt;
                  &lt;p&gt;
                      {this.state.values}
                  &lt;/p&gt;
              &lt;/div&gt;
          );
      }
  
   getDataFromUser(){
          fetch('http://localhost:8000/api/user')
              .then(response =&gt; response.json())
              .then(json =&gt; {
                  console.log(json);
                  this.setState({values: json })
          })
      }
  </code></pre>
  
  <p>In <code>console.log(json)</code>, i get <a href="https://i.stack.imgur.com/hdoQf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hdoQf.png" alt="enter image description here"></a></p>
  
  <p>But i get this error when i click in button <strong>Fetch</strong> so error in getDataFromUser:</p>
  
  <blockquote>
    <p>Unhandled Rejection (Invariant Violation): Objects are not valid as a
    React child (found: object with keys {id, nom, prenom,
    email,is_admin,created_at, updated_at}). If you meant to render a
    collection of children, use an array instead or wrap the object using
    createFragment(object) from the React add-ons.</p>
  </blockquote>
  
  <p>There's a why to create user object, So anyone can help me to resolve this issue and thanks <br /></p>