Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!