react-native/Libraries/ReactNative
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
..
AppContainer.js Codemod prettier to 1.5.2 2017-06-28 12:50:30 -07:00
AppRegistry.js Adding an optional wrapper component to app components 2017-06-26 16:33:05 -07:00
I18nManager.js Reorganize core JS files 2016-10-11 10:14:28 -07:00
UIManager.js Moved takeSnapshot method from UIManager to ReactNative 2017-03-25 00:46:54 -07:00
UIManagerStatTracker.js
YellowBox.js Add method on YellowBox to ignore warnings 2017-05-02 12:16:00 -07:00
queryLayoutByID.js Reorganize core JS files 2016-10-11 10:14:28 -07:00
renderApplication.js Fixing typo in AppContainer 2017-06-27 18:15:58 -07:00
requireNativeComponent.js Support native ViewManager inheritance on iOS 2017-07-10 16:01:12 -07:00
verifyPropTypes.js Replaced View.propTypes with a static getter that warned about deprecation 2017-03-28 11:32:09 -07:00