User Interaction Examples
Get the user's profile
The Basics
- Add Login / Signup
- Chains / Networks
- Wallets
- Users / VC's
- Accessing Users
- Verified Credentials
- Information Capture
- Email and Phone Verification
- Social Linking
- User Interaction Examples
- Design
- Onramps
Beyond The Basics
- Headless
- Global Wallets
- Bridge Widget
- Rate Limits
Developer Dashboard
- SDK and API Keys
- Sandbox vs Live
- Analytics
- User Management
- Test Accounts
- Settings
- Admin
- Webhooks
- Configuring Social Providers
Tutorials
- Farcaster
- Telegram
- Features
- Frameworks
- Integrations
- Webhooks
Migrating to Dynamic
- Migrating to Dynamic
- Migration Tutorials
For Wallets & Chains
Legacy: V1 Embedded Wallets
- V1 Embedded Wallets Overview
- Working with environments that have both v1 and v2 embedded wallets
- Transactional MFA
- Headless
User Interaction Examples
Get the user's profile
Here is an example where you can use the user profile to display in a HTML table.
import { useDynamicContext } from '@dynamic-labs/sdk-react-core';
const UserProfileTable = () => {
const { user } = useDynamicContext();
return (
<table>
<thead>
<tr>
<th>Property</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Email</td>
<td>{user?.email}</td>
</tr>
<tr>
<td>First name</td>
<td>{user?.firstName}</td>
</tr>
<tr>
<td>Last name</td>
<td>{user?.lastName}</td>
</tr>
<tr>
<td>Alias</td>
<td>{user?.alias}</td>
</tr>
<tr>
<td>Job title</td>
<td>{user?.jobTitle}</td>
</tr>
<tr>
<td>Country</td>
<td>{user?.country}</td>
</tr>
</tbody>
</table>
);
};
Was this page helpful?