2018-03-23 13:40:07 +00:00
|
|
|
/**
|
|
|
|
* Sample React Native App
|
|
|
|
* https://github.com/facebook/react-native
|
|
|
|
* @flow
|
|
|
|
*/
|
|
|
|
|
2018-03-24 02:02:59 +00:00
|
|
|
// must import before all else
|
|
|
|
|
2018-03-23 13:40:07 +00:00
|
|
|
import React, { Component } from 'react';
|
2018-03-24 02:02:59 +00:00
|
|
|
import { AppRegistry, Text, View } from 'react-native';
|
2018-03-23 13:40:07 +00:00
|
|
|
|
2018-03-27 22:00:18 +00:00
|
|
|
import bridge from 'bridge/platform/react-native';
|
2018-03-30 16:09:32 +00:00
|
|
|
import firebase from 'react-native-firebase';
|
2018-03-23 22:18:19 +00:00
|
|
|
|
2018-03-25 01:23:46 +00:00
|
|
|
require('sinon');
|
|
|
|
require('should-sinon');
|
|
|
|
require('should');
|
|
|
|
|
2018-03-23 22:18:19 +00:00
|
|
|
class Root extends Component {
|
2018-03-23 13:40:07 +00:00
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
2018-03-24 06:31:04 +00:00
|
|
|
this.state = {
|
2018-03-25 01:23:46 +00:00
|
|
|
message: '',
|
2018-03-24 06:31:04 +00:00
|
|
|
};
|
2018-03-25 01:23:46 +00:00
|
|
|
|
|
|
|
bridge.setBridgeProperty('root', this);
|
|
|
|
bridge.setBridgeProperty('module', firebase);
|
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>
|
2018-03-25 01:23:46 +00:00
|
|
|
<Text testID="messageText">{this.state.message}</Text>
|
2018-03-23 13:40:07 +00:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-03-23 22:18:19 +00:00
|
|
|
AppRegistry.registerComponent('testing', () => Root);
|