Check out example codes for "unity deactive all object in list". It will help you in understanding the concepts better.

Code Example 1

public List<GameObject> childrens = new List<GameObject>();

    void Update()
    {
        if(/* Something */)
        {
            foreach (var obj in childrens)
                obj.SetActive(false);
        }
    }

Learn ReactJs, React Native from akashmittal.com