I’ve got following simple use-case:
Open a screen with a simple Pane template, fetch data from a server and display the result in the pane template. During fetching a loading spinner should be displayed.
I use a ViewModel with a uiState. Every time the state changes “invalidate()” is called.
- Loading state is set -> invalidate() is called -> onGetTemplate() is called -> Loading spinner is displayed
- Data state is set (with a short delay) -> invalidate() is called -> onGetTemplate() is not called directly. It takes about 10 seconds until onGetTemplate() gets finally called and the data is displayed to the user.
Can anyone explain this to me? I can’t find any information about this phenomenon.
I understand that they don’t want us to update the UI too often, but this doesn’t make any sense with a loading state!