react-native/Examples/UIExplorer
Christopher Chedeau 725053acfe [Animated][BREAKING_CHANGE] Convert <TouchableOpacity> to Animated
Summary:
Because we don't want to integrate Animated inside of the core of React, we can only pass Animated.Value to styles of <Animated.View>. TouchableOpacity unfortunately used cloneElement. This means that we should have asked every single call site to replace their children to Animated.View. This isn't great.

The other solution is to stop using cloneElement and instead wrap the children inside of an <Animated.View>. This has many advantages:
- We no longer use cloneElement so we're no longer messing up with elements that are not our own.
- Refs are now working correctly for children elements
- No longer need to enforce that there's only one child and that this child is a native element

The downside is that we're introducing a <View> into the hierarchy. Sadly with CSS there is no way to have a View that doesn't affect layout. What we need to do is to remove the inner <View> and transfer all the styles to the TouchableOpacity. It is annoying but fortunately a pretty mechanical process.

I think that having a wrapper is the best solution. I will investigate to see if we can make wrappers on TouchableHighliht and TouchableWithoutFeedback as well.

**Upgrade Path:**

If the child is a View, move the style of the View to TouchableOpacity and remove the View itself.

```
<TouchableOpacity onPress={...}>
  <View style={...}>
    ...
  </View>
</TouchableOpacity>

-->

<TouchableOpacity onPress={...} style={...}>
  ...
</TouchableOpacity>
```

If the child is an Image or Text, on all the examples at Facebook it worked without any change. But it is a great idea to double check them anyway.
2015-07-20 16:44:36 -08:00
..
AnimationExample [ReactNative] Move Animated to Open Source 2015-07-07 13:44:09 -08:00
Navigator [Animated][BREAKING_CHANGE] Convert <TouchableOpacity> to Animated 2015-07-20 16:44:36 -08:00
UIExplorer Fix the main.jsbundle url in comment 2015-07-14 16:44:35 -08:00
UIExplorer.xcodeproj Added JSONKit support 2015-07-20 09:52:31 -08:00
UIExplorerIntegrationTests [Animated][BREAKING_CHANGE] Convert <TouchableOpacity> to Animated 2015-07-20 16:44:36 -08:00
UIExplorerUnitTests Added JSONKit support 2015-07-20 09:52:31 -08:00
AccessibilityIOSExample.js Fixed arguments to StatusBarIOS.setStyle in the NavigatorIOSColorExample 2015-06-11 11:06:36 -08:00
ActionSheetIOSExample.js [ReactNative] expose missing haste modules through 'react-native' node module 2015-06-30 18:57:26 -08:00
ActivityIndicatorIOSExample.js [Flow] Properly fix new errors as of Flow v0.10. 2015-04-27 14:56:21 -08:00
AdSupportIOSExample.js [ReactNative] expose missing haste modules through 'react-native' node module 2015-06-30 18:57:26 -08:00
AlertIOSExample.js [ReactNative] Add prompt to AlertIOS 2015-05-13 13:24:36 -07:00
AppStateIOSExample.js Observing "MemoryWarningNotification" and proxying it up to the DeviceEventEmitter 2015-05-22 13:09:56 -08:00
AsyncStorageExample.js Updates from Tue 7 Apr 2015-04-07 18:26:09 -07:00
BorderExample.js Implemented fast path for same borders/radii 2015-05-28 09:16:44 -08:00
CameraRollExample.ios.js [React Native] Sync from github 2015-03-27 22:09:11 -08:00
CameraRollView.ios.js [CameraRoll] support fetching videos from the camera roll 2015-06-01 15:57:32 -08:00
DatePickerIOSExample.js [Flow] Fix or suppress errors in react-native for Flow v0.13.0 2015-06-22 09:48:15 -08:00
ExampleTypes.js Fix lint errors and warnings 2015-05-14 09:39:52 -08:00
GeolocationExample.js [ReactNative] Replace console.error with alert on UIExplorer Geolocation example 2015-06-09 17:03:29 -08:00
ImageCapInsetsExample.js [React Native] Sync from github 2015-03-27 22:09:11 -08:00
ImageExample.js Merged RCTNetworkImageView functionality into RCTStaticImage 2015-07-17 07:43:16 -08:00
ImageMocks.js [Flow] Fix or suppress last minute errors for 0.12.0 2015-06-11 17:43:06 -08:00
LayoutEventsExample.js [ReactNative] Introduce onLayout events 2015-05-07 12:27:44 -08:00
LayoutExample.js Migrate unit tests from FBReactKitModules to FBReactKit 2015-07-07 16:39:35 -08:00
ListViewExample.js - [react-packager] Switch from Q to Bluebird as promises library | Pilwon Huh 2015-03-31 22:48:18 -07:00
ListViewGridLayoutExample.js Add ListView Grid Layout Example to UIExplorer Examples 2015-07-16 06:02:15 -08:00
ListViewPagingExample.js [Animated][BREAKING_CHANGE] Convert <TouchableOpacity> to Animated 2015-07-20 16:44:36 -08:00
MapViewExample.js [ReactNative] expose missing haste modules through 'react-native' node module 2015-06-30 18:57:26 -08:00
NavigatorIOSColorsExample.js [NavigatorIOS] Allow translucent on NavigatorIOS 2015-06-26 07:17:54 -08:00
NavigatorIOSExample.js [Nav] Add support for bar button icons and left buttons 2015-05-07 08:03:21 -08:00
NetInfoExample.js [react_native] Implement connectivity module 2015-06-02 05:41:16 -08:00
PanResponderExample.js [ReactNative][easy] Fix naming in PanResponderExample 2015-06-09 17:31:35 -08:00
PickerIOSExample.js [Flow] Fix or suppress errors in react-native for Flow v0.13.0 2015-06-22 09:48:15 -08:00
PointerEventsExample.js [Flow] v0.11.0 cleaning - Part 14 (react-native-github) 2015-05-13 13:24:36 -07:00
ProgressViewIOSExample.js [Flow] Fix or suppress errors in react-native for Flow v0.13.0 2015-06-22 09:48:15 -08:00
PushNotificationIOSExample.js Updates from Wed 1 Apr 2015-04-01 18:37:03 -07:00
ResponderExample.js [ReactNative] Sort UIExplorer examples 2015-04-13 04:34:23 -08:00
ScrollViewExample.js [Flow] Fix or suppress errors in react-native for Flow v0.13.0 2015-06-22 09:48:15 -08:00
SegmentedControlIOSExample.js Update SegmentedControlIOSExample.js 2015-07-08 12:52:04 -08:00
SliderIOSExample.js [React Native] Sync from github 2015-03-27 22:09:11 -08:00
StatusBarIOSExample.js Removed deprecated RCT_EXPORT + code paths 2015-06-05 09:58:25 -08:00
SwitchIOSExample.js - [react-packager] Switch from Q to Bluebird as promises library | Pilwon Huh 2015-03-31 22:48:18 -07:00
TabBarIOSExample.js Migrate unit tests from FBReactKitModules to FBReactKit 2015-07-07 16:39:35 -08:00
TextExample.ios.js [ReactNative] revert D2233419: 'Dynamic Text Sizes for Text component' 2015-07-14 15:55:06 -08:00
TextInputExample.js [Flow] Fix or suppress errors in react-native for Flow v0.13.0 2015-06-22 09:48:15 -08:00
TimerExample.js [React Native] Sync from github 2015-03-27 22:09:11 -08:00
TouchableExample.js [React Native] Add new E2E tests 2015-07-10 04:12:28 -08:00
TransformExample.js [transform] add perspective property to transform 2015-07-15 08:08:29 -08:00
UIExplorerApp.android.js [ReactNative] expose missing haste modules through 'react-native' node module 2015-06-30 18:57:26 -08:00
UIExplorerApp.ios.js [React Native] Persist open UIExplorer example between refreshes 2015-07-02 09:36:26 -08:00
UIExplorerBlock.js Fixed text background color 2015-05-28 09:31:57 -08:00
UIExplorerList.js Add ListView Grid Layout Example to UIExplorer Examples 2015-07-16 06:02:15 -08:00
UIExplorerPage.js [React Native] Fix padding in UIExplorer 2015-07-03 02:24:56 -08:00
UIExplorerTitle.js [React Native] Fix padding in UIExplorer 2015-07-03 02:24:56 -08:00
VibrationIOSExample.js [React Native] Sync from github 2015-03-27 22:09:11 -08:00
ViewExample.js [Treehouse RN] Sync for D2161376 2015-07-02 19:50:47 -08:00
WebViewExample.js [Animated][BREAKING_CHANGE] Convert <TouchableOpacity> to Animated 2015-07-20 16:44:36 -08:00
XHRExample.js Fix missing types in XHRExample 2015-06-11 18:51:04 -08:00
createExamplePage.js [Flow] v0.11.0 cleaning - Part 14 (react-native-github) 2015-05-13 13:24:36 -07:00