react-native/Libraries/Image
Nick Lockwood 848839858b Added mechanism for directly mapping JS event handlers to blocks
Summary:
Currently, the system for mapping JS event handlers to blocks is quite clean on the JS side, but is clunky on the native side. The event property is passed as a boolean, which can then be checked by the native side, and if true, the native side is supposed to send an event via the event dispatcher.

This diff adds the facility to declare the property as a block instead. This means that the event side can simply call the block, and it will automatically send the event. Because the blocks for bubbling and direct events are named differently, we can also use this to generate the event registration data and get rid of the arrays of event names.

The name of the event is inferred from the property name, which means that the property for an event called "load" must be called `onLoad` or the mapping won't work. This can be optionally remapped to a different property name on the view itself if necessary, e.g.

  RCT_REMAP_VIEW_PROPERTY(onLoad, loadEventBlock, RCTDirectEventBlock)

If you don't want to use this mechanism then for now it is still possible to declare the property as a BOOL instead and use the old mechanism (this approach is now deprecated however, and may eventually be removed altogether).
2015-09-02 06:11:24 -08:00
..
RCTImage.xcodeproj [React Native] open source ImageEditingManager native module 2015-07-29 15:57:48 -08:00
__tests__ [ReactNative] Copy assets to corresponding folders on Android 2015-06-01 12:21:53 -08:00
AssetRegistry.js [ReactNative] Teach flow how to deal with images 2015-08-26 18:26:09 -08:00
GlobalImageStub.js [ReactNative] Teach flow how to deal with images 2015-08-26 18:26:09 -08:00
Image.ios.js [ReactNative] Remove warning for <Image source={require('./image.jpg')} /> 2015-08-19 22:53:25 -07:00
ImagePickerIOS.js Add support for selecting media from library 2015-06-22 03:09:16 -08:00
ImageResizeMode.js [react_native] JS files from D2009265: Fix resizeMode for images 2015-04-21 12:04:32 -08:00
ImageSource.js [ReactNative][MAdMan] Add type for image source, flowify AdsManagerObjectiveTypes 2015-04-06 10:32:42 -08:00
ImageStylePropTypes.js [ReactNative] Add overflow to the whitelisted Image props 2015-07-27 11:06:27 -08:00
RCTCameraRollManager.h [ReactNative] Expanded license on obj-c files 2015-03-23 13:18:29 -08:00
RCTCameraRollManager.m Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
RCTGIFImage.h [ReactNative] Expanded license on obj-c files 2015-03-23 13:18:29 -08:00
RCTGIFImage.m Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
RCTImageDownloader.h Refactored RCTImageDownloader to use RCTNetworking instead of a separate download system 2015-07-27 13:47:52 -08:00
RCTImageDownloader.m Convert alloc/init to new to please linter 2015-08-17 08:46:00 -07:00
RCTImageEditingManager.h [React Native] open source ImageEditingManager native module 2015-07-29 15:57:48 -08:00
RCTImageEditingManager.m [React Native] open source ImageEditingManager native module 2015-07-29 15:57:48 -08:00
RCTImageLoader.h Refactored RCTImageDownloader to use RCTNetworking instead of a separate download system 2015-07-27 13:47:52 -08:00
RCTImageLoader.m Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
RCTImagePickerManager.h Add support for selecting media from library 2015-06-22 03:09:16 -08:00
RCTImagePickerManager.m Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
RCTImageRequestHandler.h [ReactNative] Refactor RCTDataManager to support pluggable data source modules (RCTURLRequestHandlers) 2015-06-09 12:27:06 -08:00
RCTImageRequestHandler.m Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
RCTImageStoreManager.h [React Native] open source ImageStoreManager native module and plug into RCTImageLoader 2015-07-20 22:48:54 -08:00
RCTImageStoreManager.m Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
RCTImageUtils.h Fixed image clipping / resizing logic 2015-08-13 08:13:55 -08:00
RCTImageUtils.m Fixed image clipping / resizing logic 2015-08-13 08:13:55 -08:00
RCTImageView.h Merged RCTNetworkImageView functionality into RCTStaticImage 2015-07-17 07:43:16 -08:00
RCTImageView.m Added mechanism for directly mapping JS event handlers to blocks 2015-09-02 06:11:24 -08:00
RCTImageViewManager.h Merged RCTNetworkImageView functionality into RCTStaticImage 2015-07-17 07:43:16 -08:00
RCTImageViewManager.m Added mechanism for directly mapping JS event handlers to blocks 2015-09-02 06:11:24 -08:00
RelativeImageStub.js [ReactNative] Teach flow how to deal with images 2015-08-26 18:26:09 -08:00
resolveAssetSource.js [ReactNative] Copy assets to corresponding folders on Android 2015-06-01 12:21:53 -08:00