Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce ReactContext.getNativeModules()
Summary: ## Rationale The CatalystInstance exposes a public API that returns a list of all instantiated NativeModules: [CatalystInstance.getNativeModules()](https://www.internalfb.com/code/fbsource/[d9cd2e5dd41fc3e3022bfb777c8b31c92af8c537]/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstance.java?lines=73). This enables a use-case: process all NativeModules that conform to a particular interface, to, for example, remove sensitive data before logging out. ## Changes This diff moves that CatalystInstance.getNativeModules() API into the ReactContext. This allows us to migrate NativeModules leveraging this use-case off of ReactContext.getCatalystInstance(), which makes them bridgeless-mode compatible. Changelog: [Android][Added] Introduce ReactContext.getNativeModules() Reviewed By: sshic Differential Revision: D35286940 fbshipit-source-id: 1b64351aa3f65ee59e6438a7a95974e219ccc69c
- Loading branch information