When to call function vs function() in react onClick? : <p>I'm having questions about when to call a function inside a react component. Sometimes my code breaks when I don't add the brackets to a function call, but not always. Is there some sort of rule i'm missing here?</p>

<p><strong>Doesn't work</strong></p>

<pre><code>// Callback of parent component
&lt;Link onClick={this.props.OnNavigate}&gt;
    A link
&lt;/Link&gt;
</code></pre>

<p><strong>Does work</strong></p>

<pre><code>// Callback of parent component
&lt;Link onClick={this.props.OnNavigate()}&gt;
    A link
&lt;/Link&gt;

// Callback for function of component
&lt;li onClick={this.toggleDepartments}&gt;other example&lt;/li&gt;
</code></pre>
