Realm useUser return null even after successfull anonymous login

I am using realm in react and react native both for an ecommerce. I have created atlas function for for API which is working fine in react web app, but in react native I am facing some problems, right now the useUser function return undefined although successfull login with anonymous authentication, in realmcontect I have no schema because schema is not fixed for my dataset. I need some guide on this