title: What is the difference between passing a function as a prop with or without parentheses in React?
body: <p>This is probably something that I should know but I don't quite understand the behavior of my component when I pass a function without parentheses. Here's my component code.</p>
  
  <pre><code>import React, { Component } from 'react';
  import { connect } from 'react-redux';
  import { Link } from 'react-router-dom';
  
  import AppBar from 'material-ui/AppBar';
  import LoginButton from './LoginButton';
  import LogoutButton from './LogoutButton';
  
  class Header extends Component {
    renderButton() {
      switch (this.props.auth) {
        case null:
          return
        case false:
          return &lt;LoginButton /&gt;
        default:
          return &lt;LogoutButton /&gt;
      }
    }
  
  
  
  handleTitleClick() {
      return(
        &lt;Link to={this.props.auth ? '/classes' : '/'}&gt;
          QueueMe
        &lt;/Link&gt;
      );
    }
  
    render() {
      const styles = {
        title: {
          cursor: 'pointer',
        },
      };
  
      return(
        &lt;AppBar
          title={&lt;span style={styles.title}&gt;QueueMe&lt;/span&gt;}
          onTitleClick={this.handleTitleClick()}
          iconElementRight={this.renderButton()}
          showMenuIconButton={false}
        /&gt;
      );
    }
  }
  
  /*
   * @input: redux state
   * Allows the component to access certain piece of the state as props
   * Reducers determine the key in the state
   */
  function mapStateToProps(state) {
    return { auth: state.auth };
  }
  
  export default connect(mapStateToProps)(Header);
  </code></pre>
  
  <p>For my <code>onTitleClick</code> property in <code>&lt;AppBar&gt;</code>, I get the expected behavior when I pass it <code>handleTitleClick()</code> but when I pass it <code>handleTitleClick</code> and click it, I get an error that says <code>Cannot read property 'auth' of undefined</code>. What exactly is the difference here that causes the <code>handleTitleClick</code> not to be aware of the state?</p>