Check out example codes for "how to reference scripts in other scenes unity". It will help you in understanding the concepts better.
Code Example 1
//you can use this to preserve scripts when loading new scene
DontDestroyOnLoad();
Learn ReactJs, React Native from akashmittal.com