Check out example codes for "setting the parent of a transform which resides in a prefab". It will help you in understanding the concepts better.

Code Example 1

//You might have tried to set the transform of the prefab as the child
//instead of the transform of the object you instantiated by accident.
GameObject name = (GameObject)Instantiate(namePrefab);
namePrefab.transform.parent = nameOfParent.transform; //Wrong
name.transform.parent = name.transform; //Correct

Learn ReactJs, React Native from