Wrapped UIManager native module for better abstraction

Summary: public

RCTUIManager is a public module with several useful methods, however, unlike most such modules, it does not have a JS wrapper that would allow it to be required directly.

Besides making it more cumbersome to use, this also makes it impossible to modify the UIManager API, or smooth over differences between platforms in the JS layer without breaking all of the call sites.

This diff adds a simple JS wrapper file for the UIManager module to make it easier to work with.

Reviewed By: tadeuzagallo

Differential Revision: D2700348

fb-gh-sync-id: dd9030eface100b1baf756da11bae355dc0f266f
This commit is contained in:
Nick Lockwood
2015-11-27 05:39:00 -08:00
committed by facebook-github-bot-9
parent 9e30c3b218
commit 60db876f66
25 changed files with 102 additions and 90 deletions

View File

@@ -25,10 +25,11 @@ var {
StyleSheet,
Text,
TouchableHighlight,
UIManager,
View,
} = React;
var ImageEditingManager = NativeModules.ImageEditingManager;
var RCTScrollViewConsts = NativeModules.UIManager.RCTScrollView.Constants;
var RCTScrollViewConsts = UIManager.RCTScrollView.Constants;
var PAGE_SIZE = 20;