title: Error: Uncaught (in promise) TypeError: this.props.repos.map is not a function
body: <p>I'm new in React but I'm building a simple app to search GitHub users just put their usernames. It must bring me information about the users and theirs respective repositories, but I have a problem whit the code:</p>
  
  <p>Errors: </p>
  
  <blockquote>
    <p>Uncaught (in promise) TypeError: this.props.repos.map is not a function   </p>
    
    <p>Uncaught (in promise) TypeError: Cannot read property '_currentElement' of null</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre><code>var React = require('react');
  var UserRepos = React.createClass({
      getInitialState: function () {
  
          return {
              reposCount: 0,
          }
      },
      componentWillReceiveProps: function (props) {
          console.log(props);
          this.setState({reposCount: props.repos.length});
      },
  
      render: function () {
         var repos = this.props.repos.map(function (repo, key) {
              return (
                  &lt;div key={key} className="thumbnail"&gt;
                      &lt;div className="caption"&gt;
                          &lt;h3&gt;{repo.name}
                              &lt;span className="badge"&gt;{repo.stargazers_count} STARS&lt;/span&gt;
                          &lt;/h3&gt;
                          &lt;p&gt;{repo.description}&lt;/p&gt;
                          &lt;p&gt;
                              &lt;a href={repo.html_url} className="btn btn-primary" role="button"&gt;Repository&lt;/a&gt;
                              &lt;a href={repo.html_url + '/issues'} className="btn btn-default" role="button"&gt;Issues ({repo.open_issues}) &lt;/a&gt;
                          &lt;/p&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              );
          });
                 return (
                     &lt;div&gt;
                         &lt;h2&gt;{this.state.reposCount} repositories&lt;/h2&gt;
                         {repos}
                     &lt;/div&gt;
                 )
      }
  });
  
  module.exports =UserRepos;
  </code></pre>