react-native-firebase/bridge/app.js

32 lines
677 B
JavaScript
Raw Normal View History

/* eslint-disable import/extensions,import/no-unresolved */
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
import bridge from 'bridge/platform/react-native';
import firebase from 'react-native-firebase';
2018-03-23 22:18:19 +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 = {
message: '',
2018-03-24 06:31:04 +00:00
};
2018-04-16 19:20:00 +00:00
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>
<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);