Your implementation looks great and will certainly use this approach for my new project. However, how would you handle loading state/logic to display a spinner or smth in such a case? I've tried to figure it out by myself but couldnt. Thank you.
If we're talking about Axios and file loading - there is a special callback for this: onUploadProgress in Request Config.
onUploadProgress
Talking about loaders, you could implement an interceptor for this case.
Thank you for the reply!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Your implementation looks great and will certainly use this approach for my new project. However, how would you handle loading state/logic to display a spinner or smth in such a case? I've tried to figure it out by myself but couldnt. Thank you.
If we're talking about Axios and file loading - there is a special callback for this:
onUploadProgress
in Request Config.Talking about loaders, you could implement an interceptor for this case.
Thank you for the reply!