Check out example codes for "how to run a background thread in android". It will help you in understanding the concepts better.

Code Example 1

Thread thread = new Thread() {
  @Override
  public void run() {
      try { Thread.sleep(2000); }
      catch (InterruptedException e) {}

      runOnUiThread(new Runnable() {
          @Override
          public void run() {
              textView.setText("OK");
          }
      });
  }
};
thread.start();

Learn ReactJs, React Native from akashmittal.com