Welcome to the Counter App, a simple stopwatch application built using React and Vite. This app allows users to measure time intervals with features for starting, pausing, and resetting the stopwatch.
- Introduction
- Features
- Installation
- Usage
- How It Works
- Functionality Overview
- Video Demo
- Contributing
- License
- Our Valuable Contributors
- Start, pause, and reset stopwatch functionality
- Real-time time display
- Easy-to-use and responsive user interface
- Fast performance with Vite for development
- Deployed version available (optional: include link)
Follow these steps to get the Counter App up and running on your local machine.
- Clone the repository
git clone https://github.com/yourusername/counter-app.git
- Navigate to the project directory
cd counter-app
- Install dependencies
npm install
- Start the development server
npm run dev
Vite will launch the app in your default browser at http://localhost:5173
.
- Start/Stop: Click the 'Start' button to begin timing, and the same button will turn into 'Stop' when the timer is running.
- Pause/Resume: Pause the stopwatch by pressing the 'Stop' button and resume with 'Start'.
- Reset: Reset the timer to zero by clicking the 'Reset' button.
The Counter App uses React's state management to control the stopwatch functionality. When the 'Start' button is pressed, the app starts counting time using setInterval()
, and when paused or stopped, it clears the interval. Time is displayed in real-time by continuously updating the state.
- Start Timer: Initializes the timer using a
setInterval
function, updating every 100 milliseconds. - Pause Timer: Stops the interval without resetting the elapsed time.
- Reset Timer: Clears the interval and resets the state to the initial value of
00:00:00
.
Check out the app in action by watching this demo:
counter-app-video-demo.1.mp4
Contributions are welcome! If you would like to make any changes, feel free to fork the repository and submit a pull request.
- Fork the repository
- Clone the forked repository
git clone https://github.com/yourusername/counter-app.git
- Create a new branch for your feature:
git checkout -b feature-branch
- Commit your changes:
git commit -m 'Add new feature'
- Push to the branch:
git push origin feature-branch
- Submit a pull request
For more detailed guidelines on contributing, please refer to the Contributing.md file.
This project is licensed under the MIT License. See the LICENSE file for details.