Check out example codes for "how to check if recyclerview is empty". It will help you in understanding the concepts better.

Code Example 1

// siyanda zama
if (recyclerview.getItemCount() == 0)
  {
    Toast.makeText(getActivity(), "No records to show!", Toast.LENGTH_SHORT).show();
  }

Learn ReactJs, React Native from akashmittal.com