### handleAuthStateChange

Similar to `onAuthUIStateChange`, `handleAuthStateChange` is a function you can attach to UI components that will fire whenever the state of the UI component changes.

**Usage**

```js
import { AmplifyAuthenticator } from "@aws-amplify/ui-react";
import { AuthState } from "@aws-amplify/ui-components";

handleAuthStateChange((nextAuthState, authData) => {
  if (nextAuthState === AuthState.SignedIn) {
    console.log("user successfully signed in!");
    console.log("user data: ", authData);
  }
  if (authData) {
    console.log("authData: ", authData);
  }
});

<AmplifyAuthenticator handleAuthStateChange={handleAuthStateChange} />
```