react-native/React
Nick Lockwood f7edcda5d7 Deprecated RCTDidCreateNativeModules notification
Summary:
public

Thanks to the new lazy initialization system for modules, `RCTDidCreateNativeModules` no longer does what the name implies.

Previously, `RCTDidCreateNativeModules` was fired after all native modules had been initialized. Now, it simply fires each time the bridge is reloaded. Modules are created on demand when they are needed, so most of the assumptions about when `RCTDidCreateNativeModules` will fire are now incorrect.

This diff deprecates `RCTDidCreateNativeModules`, and adds a new notification, `RCTDidInitializeModuleNotification`, which fires each time a module a new module is instantiated.

If you need to access a module at any time you can just call `-[bridge moduleForClass:]` and the module will be instantiated on demand. If you want to access a module *only* after it has already been instantiated, you can use the `RCTDidInitializeModuleNotification` notification.

Reviewed By: tadeuzagallo

Differential Revision: D2755036

fb-gh-sync-id: 25bab6d5eb6fcd35d43125ac45908035eea01487
2015-12-15 05:43:33 -08:00
..
Base Deprecated RCTDidCreateNativeModules notification 2015-12-15 05:43:33 -08:00
Executors Replace private bridge categories with private header 2015-12-15 05:40:27 -08:00
Layout Fix width being ignored when has a value of 0 2015-09-25 15:42:21 -07:00
Modules Deprecated RCTDidCreateNativeModules notification 2015-12-15 05:43:33 -08:00
Profiler Deprecated RCTDidCreateNativeModules notification 2015-12-15 05:43:33 -08:00
React.xcodeproj Replace private bridge categories with private header 2015-12-15 05:40:27 -08:00
Views Fix retain cycle 2015-12-10 12:14:34 -08:00