react-native-workers (RN 0.43^)
Do heavy data process outside of your UI JS thread.
Before using this kind of solution you should check if InteractionManager.runAfterInteractions is not enough for your needs, because creating a aditional worker can considerably increase app memory usage.
I mostly use this library for a personal project, that wrap a native database with a graphql api. So the updates may follow my needs, but any PR is welcome.
Automatic Instalation
npm install --save rn-workers
react-native link rn-workers
Prepare your project following this SETUP GUIDE
App side
//index.ios.js Component { //Create using default worker port (8082) thisworker = ; //Create worker pointing to custom one thisworker2 = 8083; //Add listener to receve messages thisworker this; //Send message to worker (Only strings is allowed for now) thisworker } { //Terminate worker thisworker; } ...
Worker side
//index.worker.js const worker = ; worker { //Reply the message back to app worker };
Aditional Information
License
Cancer GPL ..... just kindind, its Apache 2.0