Add note in View.js render method that wrapper component is not used.

Summary: Got bitten lately by View.js returning different component based on `__DEV__`

Adding a warning in the render method that should make it cleaner in the future that this method is not actually being used in prod mode.
Closes https://github.com/facebook/react-native/pull/4322

Reviewed By: svcscm

Differential Revision: D2691880

Pulled By: vjeux

fb-gh-sync-id: 119672740969a857ab6288b7914d52e8d40a1d95
This commit is contained in:
Krzysztof Magiera 2015-11-24 13:05:34 -08:00 committed by facebook-github-bot-4
parent 510f001390
commit 469a65217c
1 changed files with 4 additions and 0 deletions

View File

@ -312,6 +312,10 @@ var View = React.createClass({
},
render: function() {
// WARNING: This method will not be used in production mode as in that mode we
// replace wrapper component View with generated native wrapper RCTView. Avoid
// adding functionality this component that you'd want to be available in both
// dev and prod modes.
return <RCTView {...this.props} />;
},
});