Skip to content

Commit

Permalink
Add a note about timing reduxjs#2435
Browse files Browse the repository at this point in the history
  • Loading branch information
chmac authored and silte committed Aug 21, 2023
1 parent 54adc25 commit f0ac8fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/api/createListenerMiddleware.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@ These methods provide the ability to write conditional logic based on future dis

Both these methods are cancellation-aware, and will throw a `TaskAbortError` if the listener instance is cancelled while paused.

Note that both `take` and `condition` will only resolve **after the next action** has been dispatched. They do not resolve immediately even if their predicate would return true for the current state.

### Child Tasks

- `fork: (executor: (forkApi: ForkApi) => T | Promise<T>) => ForkedTask<T>`: Launches a "child task" that may be used to accomplish additional work. Accepts any sync or async function as its argument, and returns a `{result, cancel}` object that can be used to check the final status and return value of the child task, or cancel it while in-progress.
Expand Down

0 comments on commit f0ac8fe

Please sign in to comment.