Check out example codes for "rick astley - never gonna give you up". It will help you in understanding the concepts better.

Code Example 1

never gonna let you down

Code Example 2

// https://www.youtube.com/watch?v=dQw4w9WgXcQ

Learn ReactJs, React Native from akashmittal.com