Closed Mergemat closed 4 months ago
I see that errors array being created, but not returned. This feature was planned already? https://github.com/Telegram-Mini-Apps/tma.js/blob/c50df6da158925897768dfa65347142cd1c0dcd3/packages/sdk/src/launch-params/retrieveLaunchParams.ts#L12
Could you explain how it breaks the Next.js build process?
Could you explain how it breaks the Next.js build process?
there is no launch params on build. so when code runs on build to create static pages, it gets an error from retrieveLaunchParams and stops build process
You will never have launch parameters on the build stage. How do you expect it working properly?
You will never have launch parameters on the build stage. How do you expect it working properly?
not throwing errors, just returning them
now i need to block the whole app on server (like you did in next-template), and render only on client. but what's the point in using Next.js when your whole app is now client side
but what's the point in using Next.js when your whole app is now client side
There is no point at all. Telegram Mini Apps is mostly a client side technology. You can use useLaunchParams(true)
in case, you are using SSR.
Is your feature request related to a problem? Please describe.
retrieveLaunchParams errors, breaking Next.js build process.
So in Next.js we should do this
Approach above fixes the situation, but this is a lot of code for the data that we use very often.
Describe the solution you'd like
Maybe it could return errors instead of throwing, so using a hook will look something like this?
Describe alternatives you've considered
No response
Additional context
No response