Releases: aws-amplify/amplify-ui
@aws-amplify/[email protected]
Patch Changes
-
Updated dependencies [
4932b43f8
]:- @aws-amplify/[email protected]
@aws-amplify/[email protected]
Patch Changes
-
#1207
b920368e7
Thanks @ErikCH! - Added translations for errors for confirm sign in -
Updated dependencies [
4932b43f8
]:- @aws-amplify/[email protected]
@aws-amplify/[email protected]
Patch Changes
-
Updated dependencies [
4932b43f8
]:- @aws-amplify/[email protected]
@aws-amplify/[email protected]
@aws-amplify/[email protected]
@aws-amplify/[email protected]
Minor Changes
-
#1168
b32dd86bf
Thanks @wlee221! - This enablesuseAuthenticator
usage outside to access commonly requested authenticator context likeuser
androute
.First wrap your App with
Authenticator.Provider
:const App = ( <Authenticator.Provider> <MyApp /> </Authenticator.Provider> );
To avoid repeated re-renders, you can pass a function that takes in Authenticator context and returns an array of desired context values. This hook will only trigger re-render if any of the array value changes.
const Home = () => { const { user, signOut } = useAuthenticator((context) => [context.user]); return ( <> <h2>Welcome, {user.username}!</h2> <button onClick={signOut}>Sign Out</button> </> ); }; const Login = () => <Authenticator />; function MyApp() { const { route } = useAuthenticator((context) => [context.route]); return route === 'authenticated' ? <Home /> : <Login />; }
Patch Changes
@aws-amplify/[email protected]
@aws-amplify/[email protected]
@aws-amplify/[email protected]
@aws-amplify/[email protected]
Patch Changes
-
#1165
4238ee696
Thanks @joebuono! - Pin all @aws-amplify/ui-react dependencies -
#1162
e0fcf3685
Thanks @wlee221! - Add explicitINIT
step for initializing authMachine -
#1164
b4c327a73
Thanks @Jesmaster! - Removed hard-coded styles from Authenticator Sign Up button -
Updated dependencies [
6c070b2e1
,e0fcf3685
,3a69c2a75
]:- @aws-amplify/[email protected]