Check out example codes for "unity deactive code from code". It will help you in understanding the concepts better.

Code Example 1

public MonoBehaviour script;

void Start()
{
script.enabled = false;
}

Learn ReactJs, React Native from akashmittal.com