Async tasks in component template

Hi, I am using the component template for an open source project.
I have no problem adding new components and handling events and
actions, anything tui related is very clear to me, but i am struggling
to find the “proper” way of adding a “background” async task.
Basically an http request that should be triggered every time a certain
event gets triggered and also the “proper” way to send and receive the
obtained data.
I hope i am being clear on my doubt.

Does this example help?

thanks very insightful video, i actually understand the technical implementation and how to do it my concern is more related to the actual component template, thinkg of it as a “framework”, my doubt is what would be the “proper” or “opinionated” way to implement async tasks into it.