mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 03:50:11 +08:00
access view managers as Native Modules
Reviewed By: achen1 Differential Revision: D4338782 fbshipit-source-id: 1573e45ee3af5a44d033a166424e556b2c091fb6
This commit is contained in:
committed by
Facebook Github Bot
parent
577fd0cbb9
commit
5e9db574ee
@@ -101,7 +101,11 @@ if (Platform.OS === 'ios') {
|
||||
}
|
||||
});
|
||||
} else if (Platform.OS === 'android' && UIManager.AndroidLazyViewManagersEnabled) {
|
||||
// TODO fill this out
|
||||
UIManager.ViewManagerNames.forEach(viewManagerName => {
|
||||
defineLazyObjectProperty(UIManager, viewManagerName, {
|
||||
get: () => NativeModules[viewManagerName.replace(/^(RCT|RK)/, '')],
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = UIManager;
|
||||
|
||||
Reference in New Issue
Block a user