Check out example codes for "c# unity get lines". It will help you in understanding the concepts better.
Code Example 1
//Gameobject has to be active (Displayed) //otherwise it will return the value from the last active frame (0)! Canvas.ForceUpdateCanvases(); [Your Text Compontent].cachedTextGenerator.lineCount;
Learn ReactJs, React Native from akashmittal.com