Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

152
Views
Where/How to do heavy processing in React Native

I am building a React Native/Expo App and I am using a lexicon module (https://github.com/peterolson/chinese-lexicon) which fetches some big files and does some heavy transformations, so it takes about 10-15 seconds to load. While loading the module, the whole app freezes.

I know that there is no multithreading in Javascript - but there has to be a way to do some heavier processing without blocking the UI, right? Where/how do I load this module without making my app freeze?

I tried to edit the module and make it return a Promise which resolves as soon as the Lexicon is loaded:

function load() {
    return new Promise((Resolve, reject) => {
        //All the code from the module
        //Calling Resolve with the loaded lexicon
    }
}
module.exports = { load }

Now I am loading the lexicon like this: require('chinese-lexicon').load().then((lexicon) => { ... });, however it is still blocking the main thread - which makes sense, as the Promise executor function itself is still running synchronously.

I also tried some tricks like using setTimeout(() => { ... }, 0) in the Promise executor function, but it's still blocking.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!