Nick Lockwood f9b744d501 Use lazy getters to reduce require('react-native') overhead
Summary:
public

In the open source React Native implementation, the recommended approach for importing modules is by importing a the `ReactNative` object, which includes all available modules.

This is rather inefficient because it ends up initializing all the JS modules, even if you don't use them.

This diff switches the properties of the `ReactNative ` object to lazy getter functions, which defers the `require` until the module is actually requested.

This doesn't prevent unused modules from being included in the JS bundle, but it will prevent them from being initialized unless/until they are used.

Reviewed By: vjeux

Differential Revision: D2722993

fb-gh-sync-id: 0e9a2beb3aa6cd087a0592bd59a8f9242040be0c
2015-12-07 17:00:42 -08:00
..
2015-12-02 12:33:30 -08:00
2015-11-14 06:29:27 -08:00
2015-12-05 14:59:29 -08:00
2015-12-01 07:26:29 -08:00
2015-12-01 20:11:26 -08:00
2015-12-03 18:29:28 -08:00
2015-12-03 09:10:29 -08:00
2015-12-01 20:11:26 -08:00
2015-12-01 20:11:26 -08:00