title: How to get the length of the text inside the React component
body: <p>I have React component, where I have some dynamic text:</p>
  
  <pre><code>...
  let spanLength
  
  return(
    &lt;SomeComp&gt;
       ...
       &lt;span&gt;Some static text: {someDynamicText}, {someAnotherText}&lt;/span&gt;
       ...
    &lt;/SomeComp&gt;
  )
  </code></pre>
  
  <p>How can I get the length of text inside <code>span</code> element to a <code>spanLength</code> variable?</p>