Check out example codes for "css add dots if text too long". It will help you in understanding the concepts better.

Code Example 1

text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;

Learn ReactJs, React Native from akashmittal.com