fix(useTimeoutPoll): unexpected immediate execution #3159
Merged
Deleted GitHub App / Copilot for PRs
succeeded
Jun 16, 2023 in 13s
Analysis complete
Summary
Fixed a bug in useTimeoutPoll
that caused the polling function to run immediately. Added an option to useTimeoutFn
to delay the first execution.
Walkthrough
- Prevent polling function from running immediately on the first call by passing
{ immediate: false }
option touseTimeoutFn
(link). This fixes a bug reported in issue #674 and allows the user to control when to start the polling by calling thestart
function returned byuseTimeoutPoll
.
Poem
useTimeoutFn
waits
no immediate polling
user starts in fall
Emoji
🐛🛠️🚀
Include these descriptions in your pull request description by including the following marker tags:
copilot:all
: all the content, in one gocopilot:summary
: a one paragraph summary of the code changescopilot:walkthrough
: a step by step walkthrough of the code changescopilot:poem
: a poem about the code changes!copilot:emoji
: three emoji that capture the changes
Feedback is welcome. Simply add a comment to this PR of the form /copilot feedback [your comments here]
.
Details
Copilot for PRs is a limited technical preview from GitHub Next.
It's aim is to make it easier to write pull request descriptions by providing automatically generated suggestions based on the code changes.
To find out more go to https://githubnext.com/projects/copilot-for-pull-requests or come and chat with us on Discord
File | Status | Duration |
---|---|---|
Summary & Walkthrough | ✅ Finished | 11 seconds |
packages/core/useTimeoutPoll/index.ts | ✅ Finished | 3.9 seconds |