react-native-firebase/tests-new/app.js

39 lines
741 B
JavaScript
Raw Normal View History

2018-03-23 13:40:07 +00:00
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
2018-03-23 22:18:19 +00:00
import rnModule, { AppRegistry, Text, View } from 'react-native';
2018-03-23 13:40:07 +00:00
2018-03-23 22:18:19 +00:00
import testModule from './firebase';
class Root extends Component {
2018-03-23 13:40:07 +00:00
constructor(props) {
super(props);
2018-03-23 22:18:19 +00:00
this.state = {};
2018-03-23 13:40:07 +00:00
}
2018-03-23 22:18:19 +00:00
componentDidMount() {
if (global.__initializeEnvironment) {
console.log('Initializing environment...');
global.__initializeEnvironment({
root: this,
rnModule,
testModule,
});
}
2018-03-23 13:40:07 +00:00
}
2018-03-23 22:18:19 +00:00
render() {
2018-03-23 13:40:07 +00:00
return (
2018-03-23 22:18:19 +00:00
<View>
<Text>React Native Firebase Test App</Text>
2018-03-23 13:40:07 +00:00
</View>
);
}
}
2018-03-23 22:18:19 +00:00
AppRegistry.registerComponent('testing', () => Root);