i'm new to blazor and stumbled upon something strange. If i do an infinite while loop in the OnInitializedAsync override, it will keep running after navigating to another page.
Furthermore, if i navigate back and forth, it will run multiple of these infinite while loops. As if it's creating a new instance on every navigation to the page, but doesn't clean up the instance when navigating away from the page.
How is this possible? And what would be the recommended approach to do continuous api requests (for updating data), as long as the user has not switched page? Or any kind of continuous task for that matter.
Thanks! -Victor