title: React - Equivalent to Angular template reference variables?
body: <p>Is there any substitute or work around for achieving the work of template reference variables of Angular in React?</p>
  
  <p>In Angular, a template reference variable is often a reference to a DOM element within a template. You declare a reference variable by using the hash symbol (#).</p>
  
  <p>For Example, the #firstNameInput declares a firstNameInput variable on an <code>&lt;input&gt;</code> element.</p>
  
  <pre><code>&lt;input type="text" #firstNameInput&gt;
  &lt;input type="text" #lastNameInput&gt;
  </code></pre>
  
  <p>After that you can access the variable anywhere inside the template. For example, I pass the variable as an parameter on an event.</p>
  
  <pre><code>&lt;button (click)="show(lastNameInput)"&gt;Show&lt;/button&gt;
  
  
  show(lastName){
      console.log(lastName.value);
  }
  </code></pre>