How does the virtual DOM or the bridge mechanism in React Native communicate with native threads, and how do you optimize this communication?