Check out example codes for "unity how to make a ui disappear". It will help you in understanding the concepts better.

Code Example 1

using UnityEngine;
using UnityEngine.UI;

public class ScriptName : MonoBehaviour
{
    [SerializeField]
    private CanvasGroup Canvas;

	// makes canvas invisible
    void Awake()
    {
        Canvas.alpha = 0f;
        Canvas.interactable = false;
        Canvas.blocksRaycasts = false;
    }

	// when button is clicked canvas becomes visible
    public void Click()
    {
    	print("work");
        Canvas.alpha = 1f;
        Canvas.interactable = true;
        Canvas.blocksRaycasts = true;
    }
}

Learn ReactJs, React Native from akashmittal.com