Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Migration from v1 to v2 #517

Open
sn4f opened this issue Oct 24, 2024 · 2 comments
Open

[Feature]: Migration from v1 to v2 #517

sn4f opened this issue Oct 24, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@sn4f
Copy link

sn4f commented Oct 24, 2024

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

@sn4f sn4f added the enhancement New feature or request label Oct 24, 2024
@FlusherDock1
Copy link

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

@NeizKap
Copy link

NeizKap commented Nov 28, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants