Handle Loading Indicator state pre/post API call #534
alexgeorghiou
started this conversation in
General
Replies: 3 comments
-
|
My guess is that your line just before stopwatch.Stop should be passing (false) not (true) - and that it is getting set to false by another api call later. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
That was a mistype, it is false in the source code. Would you say the delay
is because of rerendering the UI?
…On Tue, 4 Mar 2025 at 00:02, Peter Morris ***@***.***> wrote:
My guess is that your line just before stopwatch.Stop should be passing
(false) not (true) - and that it is getting set to false by another api
call later.
—
Reply to this email directly, view it on GitHub
<#534 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHFNUEXY7CHTN4BQEJZBKTL2STGODAVCNFSM6AAAAABYFME4L6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMZYGEZDKNA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I'll need to look at code. Can you cut your app down to a very minimal reproduction? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I would appreciate your input on what would the best way be to handle a dispatch of a "show Loading Indicator" action , preceding an API call, then another Dispatch to hide the indicator. The hiding of the Loader takes 2-3 more seconds to complete, after API call returns a response. The problem I am facing seems to happen because the API call is awaited,
Loading Indicator with bool IsVisible { get { return ViewState.Value.Loading; } set { } }that subscribes to ViewStateLoadingAction on its OnInitializedSubscribeToAction((ViewStateLoadingAction action) => InvokeAsync(StateHasChanged));Reducer that handles new state
and Effect that dispatches action to show Loader, retrieves stuff then dispatches another action to hide Loader.
Why does the hide Loader action dispatch takes 2-3 seconds to complete?
Beta Was this translation helpful? Give feedback.
All reactions