I think this is a bug when opening my web app, sometimes (most of the times) page mounted and focused, get triggered twice (in a matter of seconds) i think only when automatically logging in a user
I dont know if thats related, but i have noticed, that when you launch the distributed app from the url myapp.appgyverapp.com it automatically goes to myapp-appgyver.com/page.PageNo when automatically signing in Maybe thats why the events get triggered twice BUT i dont think thats the case, in preview because, in the preview, the second time gets triggered, before the auto sign in process is completed (to tell you the truth i havent tested that with the distributed app)
this is how i found about the problem in the first place using toasts, as for the incognito browser, i will look more into it and report But in that case its something need to be fixed i suppose…
yeah for sure, I mainly made the post, to figure out, whether or not its a BUG that someone else has spotted, as for the fact that maybe its something that i have done wrong, as you said, i will more into it
Hmm in a plain app I don’t get such a double trigger on the initial page at least in a plain new app on an empty page, so this has something to do with your more specific setup. If you want to debug it I recommend doing some of the steps suggested above, but if you want to just get rid of it or avoid it, use debounce flow function right after page focused/mounted before any other logic to prevent logic from firing multiple times.
On a personal note, I tend to love to use debounce everywhere to prevent e.g. double clicks on buttons/navigation items etc.