
Introduction
Telegram Mini Apps (or TMAs) are web applications that run inside the Telegram messenger. Dynamic works out of the box with TMAs. Scaffold your app and add the Dynamic JavaScript SDK by following the quickstart guide.This recipe uses the Dynamic JavaScript SDK (
@dynamic-labs-sdk/client + @dynamic-labs-sdk/evm, plus @dynamic-labs-sdk/react-hooks if you read state with hooks). See the JavaScript Quickstart or React Quickstart for the base setup.Integration guide
To get started, use one of the TMA templates outlined here. The basic command to scaffold a new TMA is:@dynamic-labs-sdk/react-hooks and its TanStack Query peer dependency only if you plan to read state with React hooks:
src/lib/dynamicClient.ts
@dynamic-labs-sdk/react-hooks, wrap your routes with QueryClientProvider (outer) and DynamicProvider (inner) in src/components/Root.tsx:
- Before
- After
DynamicWidget). How you read auth and wallet state depends on whether you call client functions directly or use React hooks:
- JavaScript
- React
Call client functions directly wherever you need them. No provider required: