Check out example codes for "how to make an ui to follow gameobject". It will help you in understanding the concepts better.
Code Example 1
public Transform target;
void Update ()
{
Vector3 wantedPos = Camera.main.WorldToScreenPoint(target.position);
transform.position = wantedPos;
}
Learn ReactJs, React Native from akashmittal.com