Telegram-Mini-Apps / reactjs-template

Telegram Mini Apps application template using React, tma.js, TypeScript and Vite.
https://t.me/tmajsbot/react_example
166 stars 52 forks source link

Redirected back(home page) after open http://localhost:5173/reactjs-template #14

Open vovajr11 opened 2 weeks ago

vovajr11 commented 2 weeks ago

Hello friends! I'm new to TMA and need some help.

When I try to open the link http://localhost:5173/reactjs-template, I can’t view the page in the browser, it keeps redirecting me back.

Occasionally, the page does open, but I see the following message in the console As long as the current environment was not considered as the Telegram-based one, it was mocked. Take a note, that you should not do it in production and current behavior is only specific to the development process. Environment mocking is also applied only in development mode. So, after building the application, you will not see this behavior and related warning, leading to crashing the application outside Telegram.

What could be causing this issue?

I also have a few other questions:

Everything seems to be working, but could there be any problems or conflicts in production?

https://github.com/user-attachments/assets/c065bfde-3598-422c-9185-49de2a264ff7

heyqbnk commented 2 weeks ago

Here is the issue: https://github.com/Telegram-Mini-Apps/telegram-apps/issues/428

Is it possible to use state managers (MobX/Redux)?

Yes

Can we use Tailwind CSS or UI libraries?

Yes