Giter Club home page Giter Club logo

react-bank-account's Introduction

# Bank Account Management with useReducer and React

This project is a simple bank account management application built using React and the `useReducer` hook. It allows users to open an account, deposit, withdraw, request loans, pay loans, and close accounts.

## Features

- Open an account with an initial bonus balance.
- Deposit funds into the account.
- Withdraw funds from the account.
- Request loans, adding the loan amount to the account balance.
- Pay back loans, subtracting the loan amount from the account balance.
- Close the account if the balance is zero and there are no outstanding loans.

## Getting Started

1. Clone this repository to your local machine.
2. Install the required dependencies using the following command:

```sh
npm install
```
  1. Start the development server:
npm start

The application will be accessible at http://localhost:3000.

Usage

  1. Click the "Open Account" button to start.
  2. Use the input fields to provide necessary information for each action:
    • Deposit: Enter the amount you want to deposit and click the "Deposit" button.
    • Withdraw: Enter the amount you want to withdraw and click the "Withdraw" button.
    • Request a Loan: Enter the amount you want to request as a loan and click the "Request a loan" button.
    • Pay Loan: Enter the amount you want to pay back and click the "Pay loan" button.
  3. The account's balance and loan information will be displayed on the page.
  4. You can perform multiple actions in succession.
  5. Click the "Close Account" button to close the account if the balance is zero and there are no outstanding loans.

Technologies Used

  • React
  • useReducer Hook
  • HTML
  • CSS

react-bank-account's People

Contributors

codebyjb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.