Check out example codes for "css onclick change color". It will help you in understanding the concepts better.

Code Example 1

<style>
.dabutton:focus {
    background-color:yellow;
}
</style>
<button class="dabutton"></button> // <-- usage

Learn ReactJs, React Native from akashmittal.com