GithubHelp home page GithubHelp logo

u2_lab_react_atm's Introduction

React Hooks ATM

ATM

Overview

In this lab, we'll practice modifying an existing codebase. This repository contains the code for an existing ATM application using React. In it, you can currently deposit money into a checking account.

Objectives

  • Add the ability to withdraw money
  • Add the ability to have a savings and checking account

What You'll Be Building

ATM

Getting Started

  • fork and clone to your machine
  • cd into the directory
  • npm i to install our dependencies
  • npm start to spin up the app

Your Task

Currently, you can see that there is a Checking account where a user can deposit money. Try it out - it already works!

We need to:

  • Create a "Withdraw" button next to the "Deposit" button.
    • You should not be able to withdraw more than the current balance.
  • Create a Savings account - another component of the same class.
    • It will have the same deposit (and eventual withdraw) functionality.
  • You should not be able to use negative numbers to withdraw or deposit.

Hints

Stuck on making a Savings account? Here's a hint: The name prop being passed into Account is "Checking" - perhaps you can just call the component again for "Savings"?
Stuck on making a Withdraw button? Here's a hint: Functionality to withdraw money is quite similar to functionality for depositing money, except with subtraction instead of addition.
Stuck on limiting negative numbers? Here's a hint: When a function checks if the input is a number (with isNaN), an || condition could be added to be sure the input is not less than 0.

u2_lab_react_atm's People

Contributors

anpato avatar brandiw avatar nobodyslackey 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.