The dom rendering will jam the timer #8588
ResponseState200
started this conversation in
General Discussions
Replies: 1 comment
-
I suggest taking a look at the different component lifecycle hooks for Vue. Created fires once the component is instantiated and mounted fires after it is attached to the DOM. Typically for loaders I would start them on component mounted and then clear the timer when the REST requests are completed using a promise callback or awaiting for the async function to complete. If an error is detected in the request I will clear the timers and stop loading and display some kind of UI feedback to the user. https://vuejs.org/guide/essentials/lifecycle.html |
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
-
In the project, there is an interface with a relatively complex dom structure, and some requests will be launched when entering the interface, thus triggering loading. My design is that when the request is completed, there will be a 300ms timer to shut off loading. However, in this page, the timer will not be executed before the interface is rendered The loading time is too long because the interface rendering needs to be completed
Beta Was this translation helpful? Give feedback.
All reactions