Getting onClick events from the <Authenticator> component
See original GitHub issue** Which Category is your question related to? ** Using aws-amplify-react’s <Authenticator> component.
** What AWS Services are you utilizing? ** Cognito with both user and identity pools for login.
** Provide additional details e.g. code snippets ** This is in my render():
<Authenticator
onStateChange={ respondToAuthStateChange }
/>
I would like to know when a user clicks on the SignIn button. The onStateChange method only runs after the authentication attempt. I want to show a loading indicator while this is happening.
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Figma-to-Code (React) - UI event handler - AWS Amplify Docs
UI event handler ... Amplify Studio offers the ability to bind UI component events ( onClick , onChange , and more) to actions...
Read more >React's onClick Event Handler Explained - OpenReplay Blog
The React onClick event handler enables you to call a function and trigger an action when a user clicks an element, such as...
Read more >Is there a way to add onClick event to a custom component
I have 2 kinds of buttons, a normal html button and another custom button. I can use onClick only on ...
Read more >Amplify UI's new Authenticator component makes it easy to ...
In this blog post we will deploy a React app with Amplify Hosting, set up auth, and then integrate the <Authenticator> UI component...
Read more >Component Events and Actions - Ignition User Manual 8.1
Mouse Event. onClick events occur when the user clicks on any of their mouse's buttons, while the cursor is hovered over the component....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Correct, you could listen to the state change with Hub. It would be an API specific loading event. For example, when clicking the Sign In button exemplified above, it executes Auth.signIn and would trigger an event like
signIn-loading
on the ‘auth’ channel.This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels or Discussions for those types of questions.