Skip to content

Create Side Effect Timer when Page Renders#4

Open
ASPhillips8 wants to merge 5 commits into
learn-co-curriculum:masterfrom
ASPhillips8:working-branch-asp
Open

Create Side Effect Timer when Page Renders#4
ASPhillips8 wants to merge 5 commits into
learn-co-curriculum:masterfrom
ASPhillips8:working-branch-asp

Conversation

@ASPhillips8

Copy link
Copy Markdown

Rendered countdown timer with useEffect hook when page rendered. Timer has dependency array of the timeRemaining state and onAnswered callback. The time resets after 10 seconds and has a clean up function that stops interval from running in back ground and provides full 10 count for each question.
Screenshot 2024-06-17 at 10 54 25 AM

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.

2 participants