Check out example codes for "testing if editText is empty java". It will help you in understanding the concepts better.

Code Example 1

if (TextUtils.isEmpty(editText.getText().toString()))
{
    Toast.makeText(MainActivity.this, 
                   "Empty field not allowed!",
                   Toast.LENGTH_SHORT).show();
}
else 
{
    Toast.makeText(MainActivity.this,
                  "Proceed..",
                  Toast.LENGTH_SHORT).show();
}

Learn ReactJs, React Native from akashmittal.com