On iOS, we can ensure that the methods in a custom React Native module are executed on the main thread using a few lines of code:
- (dispatch_queue_t)methodQueue {
return dispatch_get_main_queue();
}
What would be the correct way to do this on Android?