[ENHANCEMENT] HubCallback should be exported #8634
Labels
Auth
Related to Auth components/category
feature-request
Request a new feature
React Native
React Native related issue
TypeScript
Related to TypeScript issues
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
Describe the bug
This is rather an enhancement request than a bug report.
Removing a listener from
Hub
requires to pass the listener function, and hence the function has to be declared in the outer scope. Therefore, it would be great ifHubCallback
type is provided (i.e., exported).So we can use it like the below:
Furthermore, I don't see any listeners attached when I log
Hub.listeners
.Expected behavior
To be able to denote the listener function.
Reproduction steps
Create new react native project with typescript template.
Configure auth category with social oauth.
Add Hub listener, and remove it.
Code Snippet
// Put your code below this line.
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: