Skip to content

Instantly share code, notes, and snippets.

@christopherdro
Created October 14, 2015 22:46
Show Gist options
  • Save christopherdro/2bb3d2bcbf1a324c572f to your computer and use it in GitHub Desktop.
Save christopherdro/2bb3d2bcbf1a324c572f to your computer and use it in GitHub Desktop.
'use strict';
let React = require('react-native');
let Home = require('./entry');
let FeedbackModal = require('FeedbackModal');
let {
AppRegistry,
NativeAppEventEmitter,
View,
} = React;
let ReployApp = React.createClass({
componentDidMount() {
this._feedbackSubscription = NativeAppEventEmitter.addListener('ShowFeedbackModal', ::this._handleFeedback);
},
componentWillUnmount() {
this._feedbackSubscription.remove();
},
_handleFeedback() {
this.refs.feedbackModal.toggle();
},
render() {
return (
<View>
<FeedbackModal ref="feedbackModal"/>
<Home />
</View>
);
}
});
AppRegistry.registerComponent('SocketIO', () => ReployApp);
module.exports = ReployApp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment