Check out example codes for "unity clone don't destroy on scene load". It will help you in understanding the concepts better.

Code Example 1

private static Player playerInstance; 

void Awake(){     
	 DontDestroyOnLoad (this);
	 
  if (playerInstance == null) {         
 	playerInstance = this;     
	 } 
  else {
 	DestroyObject(gameObject);
 	} 
 }

Learn ReactJs, React Native from akashmittal.com