How to add a placeholder (spinner) while loading Telegram mini app?

304 Views Asked by At

I'm making the Front part of an application in React and can't find information on how to implement the application's loading behavior. I take 2 bots as an example (Wallet, Durger King), they have their own placeholders. I can only implement a white screen (screen from a third-party bot "@Nespat_bot").

durger-king_bot - image (good)

nespat_bot - image (bad)

I tried adding inside index.js, but it was rendered after the application was initialized. It seems to me that this placeholder needs to be added somewhere outside the react application, but I don’t know where

1

There are 1 best solutions below

3
Michael Morosov On

Did you try lazy loading with Suspense components?