Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 52 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,60 @@
# Expense Tracker (React)
# Expense Tracker

This is a React version of the [vanilla JS Expense Tracker](https://github.com/bradtraversy/vanillawebprojects/tree/master/expense-tracker). It uses functional components with hooks and the context API
> A simple expense tracker built with React Hooks and Context API

## Usage
## Features

- Add income and expense transactions
- Real-time balance calculation
- Transaction history with delete functionality
- 🌙 Dark / ☀️ Light mode toggle with localStorage persistence

## Tech Stack

- React 17
- Context API + useReducer
- React Hooks
- CSS Variables for theming

## Getting Started

### Prerequisites
- Node.js v14+
- npm or yarn

### Installation

Clone the repo
```bash
git clone https://github.com/bradtraversy/expense-tracker-react.git
```

Go into the folder
```bash
cd expense-tracker-react
```

Install dependencies
```bash
npm install
```

# Run on http://localhost:3000
Start the app
```bash
npm start

# Build for prod
npm run build
```

App runs at `http://localhost:3000`

## Usage

- Enter a **description** in the Text field
- Enter a **positive number** for income (e.g. `500`)
- Enter a **negative number** for expense (e.g. `-50`)
- Click **Add transaction**
- Click the **✕** button on any transaction to delete it
- Toggle **☀️/🌙** in the header to switch themes

## License

MIT
Loading