Closed longqingzhao closed 2 months ago
Hey! I have released a new major version of the package which now doesn't have this function.
I will add a related patch note in the next few days. Until then, take a look at the templates, which were updated according to the changes done in the new major version:
ok thank you
I have saw some templates, But I want to expand sreen, I cannot find how to expand.
@longqingzhao use this:
import { postEvent } from '@tma.js/sdk';
postEvent('web_app_expand');
In case, you would like to do it with components, use this code:
import { initViewport } from '@tma.js/sdk';
const viewport = await initViewport();
viewport.expand();
ok thanks!
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 use init,it report Cannot resolve symbol 'init'
To Reproduce
import: import { init } from '@tma.js/sdk'; error: Cannot resolve symbol 'init'
Expected Behavior
can use init