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

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

Closed
vovajr11 opened this issue Aug 24, 2024 · 3 comments

Comments

@vovajr11
Copy link

vovajr11 commented Aug 24, 2024

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:

  • Is it possible to use state managers (MobX/Redux)?
  • Can we use Tailwind CSS or UI libraries?

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

demo1.mp4
@vovajr11 vovajr11 changed the title Redirected back(homa page) after open http://localhost:5173/reactjs-template Redirected back(home page) after open http://localhost:5173/reactjs-template Aug 24, 2024
@heyqbnk
Copy link
Member

heyqbnk commented Aug 25, 2024

Here is the issue:
Telegram-Mini-Apps/telegram-apps#428

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

Yes

Can we use Tailwind CSS or UI libraries?

Yes

@zakthedev
Copy link

I confirm the same issue here, it occurs when the navigator is attached:

  useEffect(() => {
    navigator.attach();
    return () => navigator.detach();
  }, [navigator]);

@heyqbnk
Copy link
Member

heyqbnk commented Oct 4, 2024

Follow this issue:
Telegram-Mini-Apps/telegram-apps#428

@heyqbnk heyqbnk closed this as completed Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants