Closed iAronTalk-Hsin closed 2 months ago
We don't use the init
function anymore. Each component has its own init*
function:
import { initUtils, initBackButton, initViewport } from '@tma.js/sdk';
const utils = initUtils();
const backButton = initBackButton();
const viewport = await initViewport(); // this one is always async. Cannot be initialised in a sync way
Official documentation will be released further, sorry.
Documentation related to this topic has just released. Check this out! https://docs.telegram-mini-apps.com/packages/tma-js-sdk-react
Telegram Application
Other
Describe the Bug
when I call init() and some other functions of the API. TypeError:Object(...) is not a function will show up
To Reproduce
literally can't call any of the API that the sdk provides
Expected Behavior
can help me here