Dynamic offers many different custom React hooks for different tasks within your code.

You can import them directly from the @dynamic-labs/sdk-react-core package, for example:

import { useDynamicContext } from "@dynamic-labs/sdk-react-core";

Here is a list of all of the hooks and links to their documentation pages:

useAuthenticateConnectedUser Can be used to authenticate already connected user.

useConnectWithOtp Connect with email or SMS OTP in headless mode.

useDynamicContext Gives you access to the full context which is initially set via the DynamicContextProvider component.

useDynamicEvents Hook to subscribe to events emitted by Dynamic

useDynamicModals Allow to programmatically show/hide some dynamic modals.

useDynamicScopes Check if user has specific scope set using our Access List scopes or NFT/Token gating.

useEmbeddedReveal Trigger the embedded wallet export flow manually.

useEmbeddedWallet Helps you handle the creation of embedded wallets.

useFunding Allow for programmatically request of the onramp UI.

useIsLoggedIn Checks if user is logged in or not.

useOtpVerificationRequest Handle email and SMS verification and securely update user profiles.

usePasskeyRecovery Trigger the passkey generation flow manually.

useRefreshUser Manually refresh the user state at any point in time.

useReinitialize Manually reinitialize the SDK at any point in time.

useSelectWalletOption Selects wallet option to connect with by wallet key.

useSendBalance Request Send Balance UI and optionally prepopulate the form for the user.

useSocialAccounts Trigger social sign-in, or social account linking and unlinking for an authenticated user.

useSwitchNetwork Switches the network of a wallet

useSwitchWallet Switches the primary wallet by wallet ID.

useTokenBalances Fetch the token balances of an account on a specified network.

useUserUpdateRequest Update user profile information in your application.

useUserWallets Get an array of the wallets for the current user/session.

useWalletConnectorEvent Hook to listen for wallet connector events like account change, chain change or disconnect.

useWalletItemActions Set of utility functions to sign with a specific wallet.