react-native/React
Christian Brevik 684e03590b Support native ViewManager inheritance on iOS
Summary:
**Motivation**
This is a re-worked version of #14260, by shergin's suggestion.

For iOS, if you want to inherit from a native ViewManagers, your custom ViewManager will not automatically export the parents' props. So the only way to do this today, is to basically copy/paste the parent ViewManager-file, and add your own custom logic.

With this PR, this is made more extensible by exporting the `baseModuleName` (i.e. the iOS `superclass` of the ViewManager), and then using that value to re-establish the inheritance relationship in `requireNativeComponent`.

**Test plan**
I've run this with a test project, and it works fine there. But needs more testing.

Opened this PR as [per shergin's suggestion](https://github.com/facebook/react-native/pull/10946#issuecomment-311860545) though, so we can discuss approach.

**Discussion**
* Android already supports inheritance, so this change should be compatible with that. But, not every prop available on `UIManager.RCTView.NativeProps` is actually exported by every ViewManager. So should `UIManager.RCTView.NativeProps` still be merged with `viewConfig.NativeProps`, even if the individual ViewManager does not export/use them to begin with?
* Does this break other platforms? [UWP](https://github.com/Microsoft/react-native-windows)?
Closes https://github.com/facebook/react-native/pull/14775

Differential Revision: D5392953

Pulled By: shergin

fbshipit-source-id: 5212da616acfba50cc285e2997d183cf8b2cd09f
2017-07-10 16:01:12 -07:00
..
Base Remove deprecated RCTAssert aliases 2017-07-07 12:21:59 -07:00
CxxBridge Replace -[RCTConvert folly_dynamic:] with direct calls to convertIdToFollyDynamic 2017-07-10 05:31:04 -07:00
CxxModule Replace -[RCTConvert folly_dynamic:] with direct calls to convertIdToFollyDynamic 2017-07-10 05:31:04 -07:00
CxxUtils Explicitly cast to (bool) where needed on objc with folly::dynamic 2017-04-18 15:36:20 -07:00
DevSupport Move inspector proxy out of the packager 2017-07-10 06:31:23 -07:00
Executors Remove RCTBatchedBridge rule and all uses from the tree 2017-04-19 17:00:43 -07:00
Inspector Remove some outdated references to xreact 2017-07-04 08:00:44 -07:00
Modules Support native ViewManager inheritance on iOS 2017-07-10 16:01:12 -07:00
Profiler Fix memory leak in RN fbsystrace support 2017-05-15 03:47:15 -07:00
React.xcodeproj RCTAnimation & RCTLayoutAnimation were decoupled from RCTUIManager 2017-07-03 16:15:50 -07:00
ReactLegacy.xcodeproj Make RCTSamplingProfilerPackagerMethod not depend on RCTBridge 2017-06-15 12:07:34 -07:00
Views Support native ViewManager inheritance on iOS 2017-07-10 16:01:12 -07:00
third-party.xcconfig More attempts to fix Travis CI runs 2017-05-10 04:32:54 -07:00