title: Component doesn't receive props
body: <p>In my <strong>home</strong> component I read a user's name and then I check if it's valid (axios returns an user if the name is correct). If it is valid and I click the button I want to display <strong>Dashboard</strong> component. The problem is even if the name is valid Dashboard <strong>doesn't receive the props</strong> from <strong>Home</strong> component. I tried something with componentDidUpdate but it didn't worked very well. What I don't understand is why if I type a correct user my Dashboard gets rendered but it doesn't get the props?</p>
  
  <p>This is my Home component without constructor:</p>
  
  <pre><code>inputChange(event) {
      this.setState({username:event.target.value});
  }
  
  login() {
      this.setState({clicked: true})
      UsersService.validUser(this.state.username).then((user) =&gt; {
          this.setState({valid: true, user: user})
      });
  }
  
  change() {
      this.setState({clicked: false})
  }
  
  render() {
      if(this.state.clicked) {
          if (this.state.valid)
              return (
                  &lt;Redirect to={{ pathname: '/dashboard', state: { user: this.state.user } }}/&gt;
              )
          else
              this.change;
      }
      return (
          &lt;div&gt;
              &lt;input onChange={this.inputChange.bind(this)}/&gt;
              &lt;button onClick={this.login}&gt;LOGIN&lt;/button&gt;
          &lt;/div&gt;
  }
  </code></pre>
  
  <p><strong>Dashboard</strong> component</p>
  
  <pre><code>export interface DashboardProps {
      user: IUser
  }
  
  interface DashboardState {
  }
  
  class Dashboard extends React.Component&lt;DashboardProps, DashboardState&gt; {
      public static defaultProps: DashboardProps = {
          user: {
              userId: '',
              name: '',
              phone: '',
              email: '',
              age: '',
              tag: []
          }
      }
      constructor(props: DashboardProps) {
          super(props);
  
          this.state = {
          };
      }
  
      render() {
          return (
              &lt;div&gt;
                  &lt;Header user={this.props.user}/&gt;
                  &lt;div&gt;
                      &lt;span&gt;Hi, {this.props.user.name}&lt;/span&gt; &lt;br/&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          );
      }
  }
  
  export default withRouter(Dashboard);
  </code></pre>