title: Firebase onSnapshot in react error, "Expected type 'tc', but it was: a custom he object"
body: <pre><code>useEffect(() =&gt; {
      try {
          let ref = collection(db, `users`);
          onSnapshot(ref, (onSnapshot) =&gt; {
  
          });
      } catch (error) {
          console.log(&quot;UserInfo&quot;, error);
      }
  }, [])
  </code></pre>
  <p>hello everyone, i am using firebase with onSnapshot (reactJs) and am getting an error like this: Expected type 'ta', but it was: a custom ln object.
  i have tried everything i know but the problem is not solved. All your opinions are appreciated and I appreciate it</p>