Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2828 Clear idle sample #3376

Merged
merged 5 commits into from
Aug 3, 2020

Conversation

compulim
Copy link
Contributor

@compulim compulim commented Aug 3, 2020

Fixes #2828.

Changelog Entry

Samples

Description

Updated 04.api/h.clear-after-idle on cyclic dependencies on hooks.

The original problem was the confusion between useTimer and the use of its returning function, setTimeRemaining. The idle interval should be part of useTimer argument, instead of setting it thru the setTimeRemaining function.

To-do

  • Update README.md

Specific Changes

  • Updated to [email protected]
  • Moved hook pattern to useTimeoutAt and useInterval
  • Changed <Timer> UI from listening to prop change, to <Countdown> UI which proactively refresh itself

  • Testing Added
    • No tests are added for samples

@compulim compulim changed the title [DRAFT] Fix #2828 Clear idle sample Fix #2828 Clear idle sample Aug 3, 2020
@compulim compulim marked this pull request as ready for review August 3, 2020 18:23
@compulim compulim force-pushed the fix-2828-clear-idle-sample branch from f44af4f to 63bcee5 Compare August 3, 2020 18:26
@compulim compulim merged commit 0d8d47f into microsoft:master Aug 3, 2020
@compulim compulim deleted the fix-2828-clear-idle-sample branch August 3, 2020 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sample "04.api/h.clear-after-idle" is causing build break
2 participants