Check out example codes for "condition when a animation finishes in unity". It will help you in understanding the concepts better.

Code Example 1

if(anim.GetCurrentAnimatorStateInfo(0).normalizedTime > 1){  //If normalizedTime is 0 to 1 means animation is playing, if greater than 1 means finished
   Debug.Log("not playing"); 
 }
 else{  
      Debug.Log("playing");
 }

Learn ReactJs, React Native from akashmittal.com