Wrap your app’s root component with MobileWalletProvider from @wallet-ui/react-native-web3js. This provider manages the wallet connection state and exposes the useMobileWallet hook to all child components.
Inside any component wrapped by MobileWalletProvider, use the useMobileWallet hook to access wallet functionality:
import { useMobileWallet } from '@wallet-ui/react-native-web3js';function MyComponent() { const { account, // The connected wallet account (null if disconnected) connect, // Connect to a wallet disconnect, // Disconnect from the wallet signMessage, // Sign an arbitrary message signIn, // Sign in with Solana (SIWS) signAndSendTransaction, // Sign and send a transaction connection, // The Solana RPC connection instance } = useMobileWallet(); return ( // Your component UI );}