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

Code Example 1

/* How to use : <div class="spinning"></div>*/

.spinning {
  animation-name: spin;
  animation-duration: 1500ms; /* How long lasts 1 turn */
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

@keyframes spin {
    from {
        transform:rotate(0deg);
    }
    to {
        transform:rotate(360deg);
    }
}

Learn ReactJs, React Native from akashmittal.com