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

Code Example 1

//Check out the game on Google Play
https://play.google.com/store/apps/details?id=com.GGdesign.HiveSurvive&hl=en

Learn ReactJs, React Native from akashmittal.com