invertase / react-query-firebase

React Query hooks for managing asynchronous operations with Firebase. Supports Authentication, Analytics, Firestore & Realtime Database.

Home Page:https://react-query-firebase.invertase.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: can't access property "delete", _firebase_util__WEBPACK_IMPORTED_MODULE_0__.getModularInstance(...) is undefined

cysabi opened this issue · comments

When attempting to use the useAuthDeleteUser hook, I recieve this error:

TypeError: can't access property "delete", _firebase_util__WEBPACK_IMPORTED_MODULE_0__.getModularInstance(...) is undefined

My code for this is nearly identical to another function that uses the useAuthSignOut hook, and that one does not fail.

Ah, based on this unmerged pr, it seems the documentation has misleading information.

Updating the code as shown in the pr now has it work as expected.

Although to be honest, I think it's a bit odd that this hook's arguments are inconsistent with the useAuthSignOut hook, especially given that the official firebase sdk's recommended way to delete / sign out a user are consistent.

There's no reason these 2 hooks should be different.