Check out example codes for "create line in unity". It will help you in understanding the concepts better.

Code Example 1

// you need the LineRenderer component in your object

var line = gameObject.AddComponent<LineRenderer>();

line.SetPosition(0, startingPoint);
line.SetPosition(1, middlePoint);
line.SetPosition(2, endPoint);

Learn ReactJs, React Native from akashmittal.com