title: How to remove a button if there is no more info in the api
body: <p>The following code is running smoothly, but I want to implement it in a way that when I do a <em>getNextPers()</em> and there is no info, it hides/removes the <em>Ver Mais</em> button. I've been looking for solutions but have found none, so any help is good. Thank you.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import axios from 'axios';
  
  class List extends React.Component {
      constructor(props){
          super(props);
          this.state = {
              personagens: [],
              page: 1,
              showBtn: true,
          };
          this.getNextPers = this.getNextPers.bind(this);
      }
  
      getNextPers(){
          const peopleApiEndpoint = `https://swapi.co/api/people/${this.state.page}`;
          axios.get(peopleApiEndpoint).then((p) =&gt;
              if(p=={}){
                  this.setState({ showBtn: false });
              }
              else {
                  this.setState({ personagens: this.state.personagens.concat(p), page: this.state.page+1 })
              }
          );
      }
  
      render(){
          return (
              &lt;div&gt;
                  &lt;p&gt;&lt;b&gt;Personagens:&lt;/b&gt;&lt;/p&gt;
                  {this.state.personagens.map((pers, i) =&gt; (
                      &lt;div key={i}&gt;
                          &lt;br /&gt;
                          &lt;p&gt;&lt;i&gt;Name:&lt;/i&gt; {pers.data.name}&lt;/p&gt;
                          &lt;p&gt;&lt;i&gt;Height:&lt;/i&gt; {pers.data.height} cm&lt;/p&gt;
                          &lt;p&gt;&lt;i&gt;Mass:&lt;/i&gt; {pers.data.mass} kg&lt;/p&gt;
                      &lt;/div&gt;
                  ))}
                  &lt;button onClick={this.getNextPers}&gt;Ver Mais&lt;/button&gt;
              &lt;/div&gt;
          );
      }
  }
  
  ReactDOM.render(&lt;List /&gt;, document.getElementById('root'));</code></pre>
  </div>
  </div>
  </p>