Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Counter-App

This is a simple React application that allows you to increment and decrement a counter value with a reset option. It is built using React and styled with Tailwind CSS.

Installation Clone the repository to your local machine:

bash Copy code git clone https://github.com/your-username/your-repo.git Change your working directory to the project folder:

bash Copy code cd your-repo Install the required dependencies:

bash Copy code npm install Usage Start the development server:

bash Copy code npm start Open your web browser and visit http://localhost:3000 to see the application in action.

Features Increment the counter by clicking the "+" button. Decrement the counter by clicking the "-" button. Reset the counter to zero by clicking the "Reset" button. Code Structure The main logic of the application is implemented in the App component located in the App.js file. Here's a brief overview of the code:

javascript Copy code import { useState } from "react";

function App() { const [count, setCount] = useState(0);

function decreaseHandler() { setCount(count - 1); }

function increaseHandler() { setCount(count + 1); }

function resetHandler() { setCount(0); }

// ...JSX for rendering the UI }

export default App;

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages