title: How do I get the github user info to show up using github api in react?
body: <p>I started making a react app that can search for a github user by username with a component that displays the username, profile avatar, number of followers, who the user is following, as well as a component that displays the user repos. I have the following code so far: </p>
  
  <pre><code>     class GitHubSearch extends React.Component {
  
           constructor(props){ 
             super(props); 
              this.state = { 
              username: '' 
            };
          }
  
  getUser(username) {
      return fetch('https://api.github.com/users/${login}')
      .then(response =&gt; response.json())
      .then(response =&gt; {
          return response;
      })
  }
  async handleSubmit(e) {
      e.preventDefault();
      let user = await this.getUser(this.refs.username.value);
      this.setState({username: user.login,
          id: user.id,
          url: user.url,
          avatar_url: user.avatar_url,
      });
  }
  
  render() {
   let user;
   if(this.state.username) {
      user = 
      &lt;div&gt;
          &lt;p&gt;{this.state.username} 
    &lt;br/&gt; 
      {this.state.id} 
    &lt;br/&gt; 
    &lt;/p&gt;
          &lt;img src={this.state.avatar_url}/&gt;
      &lt;/div&gt;
   }
  
  return (
      &lt;div className="GitHubSearch"&gt;
        &lt;header className="Search-header"&gt;
          &lt;h1&gt;Github User Search &lt;/h1&gt;
        &lt;/header&gt;
      &lt;form onSubmit={e =&gt; this.handleSubmit(e)}&gt;
        &lt;input ref='username' type='text' placeholder='username' /&gt;
      &lt;/form&gt;
              &lt;p className="Search-intro"&gt;
                  {user}
              &lt;/p&gt;
      &lt;/div&gt;
      );
     }
   }
  
   ReactDOM.render(&lt;GitHubSearch/&gt;, document.getElementById('container'));
  </code></pre>
  
  <p>This is the html:</p>
  
  <pre><code>        &lt;div id="container"&gt;
  
          &lt;/div&gt;
  </code></pre>
  
  <p>So far the component for search renders but when I input the username, I get this error in the console: <code>GET https://api.github.com/users/$%7Blogin%7D 404 (Not Found)</code></p>
  
  <p>What am I missing? </p>