react-native/Libraries
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
..
ART Refactor RCTUIManager 2015-08-06 15:49:35 -08:00
ActionSheetIOS Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
AdSupport Text highlighting on iOS 2015-07-24 08:41:58 -08:00
Animated [RN] Use default param for elastic bounciness 2015-09-01 20:38:50 -08:00
Animation [ReactNative] Remove POPAnimation 2015-08-20 22:24:28 -07:00
AppRegistry [React Native] Provide a way to get a list of registered apps in AppRegistry 2015-08-07 11:05:25 -08:00
AppStateIOS Use native initialAppState to init app_state for AppStateIOS. 2015-08-25 09:32:28 -08:00
BatchedBridge Adding jest tests to groups rn 2015-08-31 17:35:47 -08:00
CameraRoll [ReactNative] CameraRoll docs 2015-07-27 09:46:35 -08:00
Components Added mechanism for directly mapping JS event handlers to blocks 2015-09-02 06:11:24 -08:00
CustomComponents [android] fix crash if breadcrumb refs don't exist 2015-08-20 19:08:16 -07:00
DebugComponentHierarchy [ReactNative] Send debug component ownership info in createView 2015-06-25 05:47:24 -08:00
Device flowify some Libraries 2015-03-25 11:09:54 -08:00
Devtools [react-native] enable react devtools from JavascriptCore 2015-07-23 17:14:09 -08:00
Fetch [ReactNative] clean lint in all of Libraries/ 2015-05-19 13:47:04 -08:00
Geolocation Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
Image Added mechanism for directly mapping JS event handlers to blocks 2015-09-02 06:11:24 -08:00
Inspector [react-native] enable react devtools from JavascriptCore 2015-07-23 17:14:09 -08:00
Interaction InteractionManager: remove dev timeout warnings 2015-07-01 04:51:28 -08:00
JavaScriptAppEngine [react-native] Fix tests and re-enable CI 2015-08-26 20:58:24 -08:00
LayoutAnimation [ReactNative] Remove POPAnimation 2015-08-20 22:24:28 -07:00
LinkingIOS Fix LinkingIOS docs typo 2015-09-01 08:09:45 -08:00
Modal Enable transparent modal presentation with <Modal /> 2015-08-14 04:47:12 -08:00
NativeApp [ReactNative] Add "RCTNativeAppEventEmitter" 2015-05-15 16:57:18 -08:00
Network Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
Picker Removed deprecated RCT_EXPORT + code paths 2015-06-05 09:58:25 -08:00
Portal [RN] add clarifying Android-only comment to Portal 2015-08-31 11:10:45 -08:00
PushNotificationIOS Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
RCTTest [reactnative] send platform arg with all packager requests 2015-08-29 06:36:18 -08:00
RKBackendNode [ReactNative] clean lint in all of Libraries/ 2015-05-19 13:47:04 -08:00
ReactIOS [ReactNative] Remove POPAnimation 2015-08-20 22:24:28 -07:00
ReactNative [ReactNative][SyncDiff] Add parameter to allow turning on/off off screen rendering for alpha compositing 2015-08-26 15:15:36 -08:00
Settings Text highlighting on iOS 2015-07-24 08:41:58 -08:00
Storage [Docs] Clarify in the AsyncStorage docs that it is global to the app, not OS 2015-06-15 14:18:09 -08:00
StyleSheet [ReactNative] Add overflow to the whitelisted Image props 2015-07-27 11:06:27 -08:00
Text [TextInput] Set scrollsToTop = NO for UITextViews 2015-09-01 02:40:15 -08:00
Utilities [ReactNative] Improve error handling with missing bridge callback 2015-08-27 11:02:58 -08:00
Vibration Text highlighting on iOS 2015-07-24 08:41:58 -08:00
WebSocket Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
react-native [ReactNative][SyncDiff] Add more items to react-native target 2015-08-27 06:31:30 -08:00
vendor [ReactNative] Pass events through to touchable handlers 2015-08-21 03:03:32 -07:00
Promise.js Replace ES6Promise with Promise 2015-04-15 06:06:29 -08:00