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

Stopwatch- Intern Assessment #54

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

kristiiwuu
Copy link

@kristiiwuu kristiiwuu commented Jan 29, 2024

Although I didn't fully pass the tests, this was my first experience with React Native and have learned a lot.

In StopWatchButton.tsx, I created functions handleStartButton(), handleStopButton(), handleLapButton(), handleResetButton(), and formatTime() to handle events when a certain button is pressed. There is a little inaccuracy with the Lap button because I could not figure out how to subtract Date.now() and the time elapsed from pressing other buttons, such as "Resume" or "Pause." The Lap button works most accurately if pressing only Lap and none of the other buttons before resetting. Ultimately, this file exports the Stopwatch Buttons and Lap times.

In StopWatch.tsx, there is a calculateTimeInSeconds() function that takes in a number and reformats the time in seconds to a hours: minutes: seconds format (00:00:00).

In App.tsx, a title "Stopwatch App" is rendered along with the StopWatch and StopWatchButtons component.

Thank you for considering my application!

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.

1 participant