> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Accessing Connected Wallets

### Primary Wallet

In React Native, you can access the primary wallet through the `dynamicClient.wallets.primary` property. This gives you direct access to the main wallet associated with the user.

```ts React Native theme={"system"}
import { useReactiveClient } from '@dynamic-labs/react-hooks';
import { dynamicClient } from '<path to client file>';

const { wallets } = useReactiveClient(dynamicClient);
// wallets.primary -> primary wallet
// wallets.userWallets -> array of user wallets
```

### useUserWallets

React Native provides access to all user wallets through the `wallets.userWallets` array from the reactive client.

```ts React Native theme={"system"}
import { useReactiveClient } from '@dynamic-labs/react-hooks';
import { dynamicClient } from '<path to client file>';

const { wallets } = useReactiveClient(dynamicClient);
const userWallets = wallets.userWallets;

return (
  <View>
    <Text>Wallets</Text>
    {userWallets.map((wallet) => (
      <Text key={wallet.id}>{wallet.address}</Text>
    ))}
  </View>
);
```

### Check Which Wallet is Embedded

You can check which wallet is embedded by using the `useUserWallets` hook and looking for the `isEmbeddedWallet` boolean.

```ts React Native theme={"system"}
import { useReactiveClient } from '@dynamic-labs/react-hooks';
import { dynamicClient } from '<path to client file>';

const { wallets } = useReactiveClient(dynamicClient);
const userWallets = wallets.userWallets;

const embeddedWallet = userWallets.find(wallet => wallet.connector.isEmbeddedWallet);
```

### onEmbeddedWalletCreated

React Native uses the client configuration to set up event handlers for embedded wallet creation.

```ts React Native theme={"system"}
// React Native uses the client configuration
const dynamicClient = createClient({
  environmentId: 'YOUR-ENVIRONMENT-ID',
  events: {
    onEmbeddedWalletCreated: (args) => {
      console.log('onEmbeddedWalletCreated was called', args);
    }
  }
});
```

## Add extra logic during any wallet connection (walletConnected)

React Native uses the `walletConnected` event (equivalent to `handleConnectedWallet` in the React SDK) to add logic during wallet connection events.

```ts React Native theme={"system"}
const dynamicClient = createClient({
  environmentId: '<env id>',
});

dynamicClient.wallets.setHandler('walletConnected', (wallet) => {
  console.log("walletConnected was called", wallet);
  // if runYourOwnLogic return true, the connection will be established, otherwise it will not
  return runYourOwnLogic();
});
```

## What next?

<Card title="What next?" href="/react-native/wallets/using-wallets/evm/using-evm-wallets" icon="link" color="#4779FE">
  Continue with chain-specific guides (for example EVM).
</Card>
