Check out example codes for "how to create and trigger a function unity animation events". It will help you in understanding the concepts better.

Code Example 1

// Animation Event example
// Small example that can be called on each specified frame.
// The code is executed once per animation loop.using UnityEngine;
using System.Collections;public class Example : MonoBehaviour
{
    public void PrintEvent()
    {
        Debug.Log("PrintEvent");
    }
}

Learn ReactJs, React Native from akashmittal.com