Errors on useSignOut #19
-
|
I'm a bit confused by the syntax of the auth hooks. On signOut for example:
Should something like make more sense: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I'm surprised that eslint isn't able to identify the correct Rename const [{ error: signOutError, fetching }, signOut] = useSignOut()
async function onClickSignOut() {
const { error: someOtherError } = await signOut()
}
if (signOutError) return <div>Error signing out</div>Don't destructure const [signOutResult, signOut] = useSignOut()
async function onClickSignOut() {
const result = await signOut()
}
if (signOutResult.error) return <div>Error signing out</div>
|
Beta Was this translation helpful? Give feedback.
I'm surprised that eslint isn't able to identify the correct
error. Couple options available.Rename
errorwhen destructuring:Don't destructure
error: