We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I encountered odd behavior regarding the useGoogleLogin hook because only having it in my component makes it render twice.
useGoogleLogin
I got a simple example:
import { Button } from "@mui/joy"; import { useGoogleLogin } from "@react-oauth/google"; export const GoogleRegisterButton = () => { console.log('render GoogleRegisterButton'); const registerWithGoogle = useGoogleLogin({ scope: 'openid email profile', flow: 'auth-code', onSuccess: res => console.log(res.code), }); return ( <Button onClick={registerWithGoogle} > Register with google </Button> ) }
In the console render GoogleRegisterButton appears twice.
render GoogleRegisterButton
Do you know if that is necessary for this hook? when I want to call my backend service onSuccess there are two API calls.
Without this hook, there is only one message: render GoogleRegisterButton
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I encountered odd behavior regarding the
useGoogleLogin
hook because only having it in my component makes it render twice.I got a simple example:
In the console
render GoogleRegisterButton
appears twice.Do you know if that is necessary for this hook? when I want to call my backend service onSuccess there are two API calls.
Without this hook, there is only one message:
render GoogleRegisterButton
The text was updated successfully, but these errors were encountered: