title: What is the point of prefixing function names with '_' React/React-native ?
body: <p>So as per convention since JavaScript doesn't have access modifiers I have to prefix "private" function names with an underscore(_). But I am a little confused here, say I am writing a class in C++ or Java that has two functions one that performs internal calculations and the second that returns the result of that internal calculation. </p>
  
  <p>So, I have these two functions </p>
  
  <pre><code>performInternalSecretCalculation();
  getResult();
  </code></pre>
  
  <p>the <code>performInternalSecretCalculation()</code> is supposed to be private since I don't want other classes to worry about how the class handles calculation and hence I don't export this function. Whereas <code>getResult()</code> is something that will be used by other classes and hence I make it public and export this function. </p>
  
  <p>But in case of React classes I am not exporting any functions all the functions defined inside a react class are used within it. So what is the differentiator? When should I prefix an underscore before a function's name?</p>