[Feature]: Migration from v1 to v2
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
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
Personally I also faced with it, but I managed to migrate by creating new TMA template with 2.x version like npx create tma (I don't remember, look at the documentation), which has new imports/many removals and comparing my project and created template, I've migrated easily, but having the guide, it would be more nice and quicker
This commit from official telegram-sdk-react template can be good sample as a fallback how to migrate from 1.x to 2.x: https://github.com/Telegram-Mini-Apps/reactjs-template/commit/b35359b3948618960c2d4d62af492209d5978ea1
Sorry guys, we are now supporting the version 3 and not going to write the migration guide from v1 to v2