Hi pro-react-js developers.
I’m Md Mamun Islam a new react-js student.
I’m trying to use firebase auth with react-js. But I’m facing a issue with “signInWithRedirect”. After authentication there is a few second delay in login. For that time the login button remains clickable. This problem can confuse the user’s.
Can’t you just disable the button in the handler function? Add a ref to the button and use that to set the disabled attribute.
You might even do some more fancy UX where you disable the button and add a little loading spinner inside it, or at least show some sort of loading indicator somewhere in the UI.