Generator-based asynchronous memo hook
Generator version of task-memo converting generator to compound task first
Task execution is automatically interrupted in case of hook re-render or unmounting. This way, only one task is running at any given time
yielded underlying type
yielded task type
resulting task resolve type
initial value of type R, available immediately
task generator function
dependency list
memoized value, current execution status, and cancellation function, as [state, running, cancel]
useTaskMemoState
Generator-based asynchronous memo hook
Generator version of task-memo converting generator to compound task first
Task execution is automatically interrupted in case of hook re-render or unmounting. This way, only one task is running at any given time