ReactJS: How to make a component call a method only the very first it is rendered?
<p>I would like for a component to call a method only once, and only the very first time the component gets rendered. I attempted it in <code>constructor()</code>, thinking that it is supposed to occur only once and only when it is first mounted ever, but looks like whenever that component is rendered again, the <code>constructor()</code> is called again as well.</p>

<p>Is there a way to have a component call a method only once and only the very first time it is rendered? </p>

<p>Thank you</p>