title: Does react-native support Multithreading and Background threading or Parallel Execution? How can we do that?
body: <p>I have gone through the official documentation of react-native and some other medium sources and blogs, I came to know that there is <strong>UI Thread</strong> and <strong>JavaScript Thread</strong> in react-native. <strong>Javascript thread is the thread where the logic will run javascript code is executed, API calls are made, touch events are processed and many other. And UI Thread updates the UI.</strong>
  If JavaScript thread is working on the process and if we again perform button action or any other touch event it takes some time to respond, after completing one process only the UI Updates until than I feel like its lagging or it's stuck somewhere.</p>
  
  <p><strong>For example</strong></p>
  
  <p><em>There is a bottom tab navigator it has four tabs, There is a listview in the first tab and map view which shows the route between multiple points in the second tab</em></p>
  
  <p><em>I had performed some button action(clicked like button in the list view) in the first tab and immediately navigating to the second tab, It feels some lag in updating UI or it takes some time(1-3 sec) to navigate from the first tab to the second tab</em></p>
  
  <p><em>In the second tab the map takes time(5-10 sec) to fetch route between multiple points when this process is going on if I navigate to any other tab the navigation between tabs is not smooth and lots of UI lag is present.</em></p>
  
  <p><strong>How can we make the react-native app respond faster to touchable actions and reduce UI lag</strong></p>
  
  <p>Is there any concept of <strong>Multithreading</strong> and <strong>Background threading</strong> that we can run particular logics in the main thread and update UI to make a react-native application to respond faster without any lag.</p>