674 Views
While useAsyncTask is sufficient to create an async task, it's not trivial to write a func with the rule that it needs to handle AbortController. Hence, we provide two helper hooks that wrap useAsyncTask. const task1 = useAsyncTaskTimeout(func, delay);const task2 = useAsyncTaskFetch(url); useAsyncTaskTimeout is just to wait a certain amount of time and then run func.
0 comments