Check out example codes for "unityevent". It will help you in understanding the concepts better.

Code Example 1

using UnityEngine.Events;

// UnityEvents can also be serialized to the inspector
public class Foo : MonoBehaviour {
  UnityEvent action;
  
  void Start() {
    action = new UnityEvent();
    action.AddListener(() => { Debug.Log("Hello world!"); });
  }
  
  void Update() {
    action.Invoke();
  }
}

Learn ReactJs, React Native from akashmittal.com