skip to Main Content

I am getting this error whenrunning on expo. The uid is in firebase.

enter image description here

2

Answers


  1. You are probably trying to access the property "uid" of the object user before it is set.

    The error says exactly that, that you are trying to get the property uid of a null object.

    Make sure the object is set before you try to access it

    Login or Signup to reply.
  2. You could not access uid because the value of the user is null.
    You should use user?.uid for the null safe operator.
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search