Telegram-Mini-Apps / telegram-apps

Made from scratch TypeScript packages, examples and documentation you will surely need to start developing on Telegram Mini Apps.
https://docs.telegram-mini-apps.com/
MIT License
691 stars 191 forks source link

[Feature]: Migration from v1 to v2 #517

Open sn4f opened 4 weeks ago

sn4f commented 4 weeks ago

Is your feature request related to a problem? Please describe.

I am currently migrating from version v1 to version v2, but we were using imports such as:

import { initNavigator } from "@telegram-apps/sdk-react";
import { SDKProvider } from "@telegram-apps/sdk-react";
import { useBackButton } from "@telegram-apps/sdk-react";

which do not exist in v2. Is there any migration guide available? I am performing the migration because I would like to use methods related to invoices – displaying them to the user. v1 doesn't allow this as I get the error: [Telegram.WebApp] Method openInvoice is not supported in version 6.0.

Describe the solution you'd like

Would be great to have migration guide

Describe alternatives you've considered

No response

Additional context

No response

FlusherDock1 commented 3 weeks ago

Also example here: https://docs.telegram-mini-apps.com/packages/telegram-apps-react-router-integration Suggests using initNavigator from v1 of @telegram-apps/sdk-react