'Update app properties in runtime' UIExplorer demo

Reviewed By: javache

Differential Revision: D2615815

fb-gh-sync-id: 557ce1b2bc76360fe19a0893e0f317c09b685e23
This commit is contained in:
Pawel Sienkowski
2015-11-12 11:39:05 -08:00
committed by facebook-github-bot-2
parent eae91cc680
commit f1712b0cc3
9 changed files with 270 additions and 4 deletions

View File

@@ -22,6 +22,8 @@ var {
AppRegistry,
NavigatorIOS,
StyleSheet,
Text,
View
} = React;
var UIExplorerApp = React.createClass({
@@ -72,6 +74,27 @@ var styles = StyleSheet.create({
},
});
var SetPropertiesExampleApp = React.createClass({
render: function() {
var wrapperStyle = {
backgroundColor: this.props.color,
flex: 1,
alignItems: 'center',
justifyContent: 'center'
};
return (
<View style={wrapperStyle}>
<Text>
Embedded React Native view
</Text>
</View>
);
},
});
AppRegistry.registerComponent('SetPropertiesExampleApp', () => SetPropertiesExampleApp);
AppRegistry.registerComponent('UIExplorerApp', () => UIExplorerApp);
UIExplorerList.registerComponents();