I'm trying to use the firebase in a react native project
I installed the firebase in my project:
npm install --save firebase
and I'm importing it into my app.js
import firebase from 'firebase';
import React, { Component } from 'react';
import {
Platform,
Text,
View
} from 'react-native';
type Props = {};
export default class App extends Component<Props> {
render() {
return (
<View >
<Text>Testando Firebase</Text>
</View>
);
}
}
and then the error is displayed:
Objects are not valida as a react child (found: object with keys{&&typeof, type, key, ref, props, _owner, _store}). If you meant to render a collection of children, use an array instead.
but when I remove the import from firebase, the app works perfectly.
firebaseyou need add some more firebase config for your app - tuan.tranimport firebase from 'firebase'. However, the error message doesn't seem to be related to it. If changing the import doesn't solve the issue, we can check for further errors - soutot