Task-based callback hook that allows concurrent tasks
Each call starts a new task and leaves tasks already running in place. Every in-flight task is cancelled on unmount. Dependency changes do not cancel work already started.
callback argument types
task function to be invoked as callback; the task resolves to void
dependency list; the task function is memoized with these dependencies
callback to be invoked
Task-based callback hook that allows concurrent tasks
Each call starts a new task and leaves tasks already running in place. Every in-flight task is cancelled on unmount. Dependency changes do not cancel work already started.