Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object are not valid as a React child #908

Closed
miteshsavani opened this issue Jun 6, 2018 · 21 comments
Closed

Object are not valid as a React child #908

miteshsavani opened this issue Jun 6, 2018 · 21 comments

Comments

@miteshsavani
Copy link

Not able to use latest version 5.0.4. I am getting error while using it

image

@google-oss-bot
Copy link
Contributor

Hey there! I couldn't figure out what this issue is about, so I've labeled it for a human to triage. Hang tight.

@google-oss-bot
Copy link
Contributor

Hmmm this issue does not seem to follow the issue template. Make sure you provide all the required information.

@puf
Copy link

puf commented Jun 7, 2018

Same error with code (but unfortunately no accepted answer yet): https://stackoverflow.com/questions/50730706/objects-are-not-valid-as-react-child-react-native

@MidorikawaShun
Copy link

This happens to me too. Only way to get around it is installing 5.0.3

@adisai123
Copy link

I am also getting the same error, but if I run it over debug mode, it works properly.

@willianlouzefonseca
Copy link

I just install the version 4.6.2 of firebase, this works for me

@AilsonFreire
Copy link

A got the same error here is a link that solved this problem. But I think this solution is ugly cause I like to put firebase config in a separate file. So I dowgrade to 5.0.3 and it´s works

https://stackoverflow.com/questions/50555275/react-native-objects-are-not-valid-as-a-react-child-found-object-with-keys

@jshcrowthe
Copy link
Contributor

Duplicate of #871

@jshcrowthe jshcrowthe marked this as a duplicate of #871 Jun 29, 2018
@Daniyal-Najeeb
Copy link

Try this, this work for me and I am using firebase version 5.5.2
import firebase from '@firebase/app'
import '@firebase/auth'

@brianandreasen1983
Copy link

Try this, this work for me and I am using firebase version 5.5.2
import firebase from '@firebase/app'
import '@firebase/auth'

This works like a charm thank you Daniyal-Najeeb. :)

@tuanluu-agilityio
Copy link

Try this, this work for me and I am using firebase version 5.5.2
import firebase from '@firebase/app'
import '@firebase/auth'

It works fine for me. Save my life 💯 🙇

@presencewebdesign
Copy link

I changed this line

import firebase from 'firebase';

to this

import firebase from '@firebase/app'

@changx03
Copy link

changx03 commented Dec 4, 2018

Try this, this work for me and I am using firebase version 5.5.2
import firebase from '@firebase/app'
import '@firebase/auth'
Tested on firebase Version 5.6.0
Works fine 👍

I wonder why import '@firebase/auth'?

@24HourDeveloper
Copy link

Hi I'm running version 5.5.9 in my react-native app and I used this to get it to work.
import firebase from '@firebase/app';
I wonder why in some of my apps I didn't have to do this.

@bopaiah
Copy link

bopaiah commented Jan 22, 2019

import core-js in index.js seem to fix the problem for me.

import 'core-js';
import {AppRegistry} from 'react-native';

@aldarisbm
Copy link

import core-js in index.js seem to fix the problem for me.

This didn't work for me, I installed 5.0.3

@rajeevrocker7
Copy link

rajeevrocker7 commented Jan 30, 2019

I solved it 👍

  1. cleaning builds
  2. change in package.json-> "firebase": "^5.5.2",
  3. npm install

Now, you'll need to import all the parts for Firebase that you're using.
I was using Auth and Database. and Of course, firebase.initializeApp(config);
So I had to add:

change this--> // import firebase from 'firebase';
to this-->
import firebase from '@firebase/app';
import '@firebase/auth';
import "@firebase/database";

  1. run on device (react-native run-android)

:) 💯

@nkorojoseph
Copy link

I solved it 👍

  1. cleaning builds
  2. change in package.json-> "firebase": "^5.5.2",
  3. npm install

Now, you'll need to import all the parts for Firebase that you're using.
I was using Auth and Database. and Of course, firebase.initializeApp(config);
So I had to add:

change this--> // import firebase from 'firebase';
to this-->
import firebase from '@firebase/app';
import '@firebase/auth';
import "@firebase/database";

  1. run on device (react-native run-android)

:) 💯

without additional process,

i just used the
import '@firebase/database' and it worked.

thanks

@MaximWuyts
Copy link

Make sure you import React without {}
image

@zihadmahiuddin
Copy link

import core-js in index.js seem to fix the problem for me.

import 'core-js';
import {AppRegistry} from 'react-native';

Thanks, it worked for me :)

@presencewebdesign
Copy link

Again had the same error, I am now using version ^5.8.5

Remove any instance of the import if you're not using it in my case it was in the App.js

import fire from '../config/firebase';

@firebase firebase locked and limited conversation to collaborators Oct 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests