question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: v1.isEqual is not a function

See original GitHub issue

I’m getting TypeError: v1.isEqual is not a function when I use the useDocument hook

const profileRef = firebase
    .firestore()
    .collection('users')
    .doc(user.uid)

const { error, loading, value } = useDocument(profileRef)
 "react": "16.8.3",
 "react-firebase-hooks": "^1.1.0",
 "react-native": "0.59.1",
 "react-native-firebase": "^5.2.3",

Any ideas?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
DrSkunkcommented, Mar 28, 2021

For those who came across this error when not using react-native-firebase, I recently received this error when i supplied a string instead of a ref to useList()

The following snippet produced the error:

  const [snapshots, loading, error] = useList("/leaderboard");

it is fixed by replacing it with a ref like so:

  const [snapshots, loading, error] = useList(firebase.database().ref("/leaderboard"));
1reaction
chrisbiancacommented, Apr 3, 2019

@dizzyrobin You’re correct, DocumentReference in react-native-firebase doesn’t implement the isEqual method, which is a bit unfortunate.

@cmmartin It might be worth raising an issue with them directly to see if they can add it either to v5 or their upcoming v6.

In the meantime, I’ll have a think to see if this can be worked around in any way.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: v1.isEqual is not a function - Stack Overflow
I am fetching some posts from my firestore database and I am getting this error TypeError: v1.isEqual is not a function.
Read more >
Firestore useDocumentData error : r/reactjs - Reddit
Uncaught TypeError: v1.isEqual is not a function Uncaught TypeError: ref.current.onSnapshot is not a function The above error occurred in ...
Read more >
CollectionReference | Firebase JavaScript API reference
If this isn't a subcollection, the reference is null. ... Overrides Query.isEqual. Returns true if this CollectionReference is equal to the provided one....
Read more >
NumPy quickstart — NumPy v1.25.dev0 Manual
This is equal to the product of the elements of shape . ndarray.dtype. an object describing the type of the elements in the...
Read more >
Node.js v19.3.0 Documentation
If the function has not been called exactly exact times when ... The following, for instance, will throw the TypeError because there is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found