Check out example codes for "change fab image programatically". It will help you in understanding the concepts better.

Code Example 1

floatingActionButton.setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.ic_full_sad));

Learn ReactJs, React Native from akashmittal.com