Git Product home page Git Product logo

32-combining-reducers's Introduction

cf 32: Budget Tracker Continued

Submission Instructions

  • Work in a fork of this repository
  • Work in a branch on your fork
  • Write all of your code in a directory named lab- + <your name> e.g. lab-duncan
  • Submit a pull request to this repository
  • Submit a link to your pull request on canvas
  • Submit a question, observation, and how long you spent on canvas

Requirements

Feature Tasks

expense
  • in this app an expense should contain at least the following properties
    • id a uuid
    • categoryID an id that corresponds to an existing category
    • timestamp a date from when the category was created
    • name a string that is the name of the category
    • price a number that is the total amount of $ in the category
    • feel free to add more to your expense
redux
app reducer
  • export a reducer that holds the entire app state from reducer/index.js
  • create a reducer that will combine your categories reducer and expenses reducer
expenses reducer
  • create a category reducer in your your reducer directory
  • this reducer should support the following interactions
    • EXPENSE_CREATE -- store an expense
    • EXPENSE_UPDATE -- update an existing expense
    • EXPENSE_DELETE -- delete an existing expense
  • if you need others feel free to add them
action creators
  • you should create an action creator for each interaction supported by your expenses reducer
store
  • in lib/store.js exports a function that will return a redux store from your app reducer
Components

Create the following components and structure them according to the following diagram.

App
  Provider
    BrowserRouter
      Route / Dashboard
        CategoryForm -- for creating categories
        [CategoryItem] -- list of CategoryItems
           CategoryForm  -- for updating categories
           ExpenseForm -- for creating expenses
           [ExpenseItem]  -- list of ExpenseItems
              ExpenseForm -- for updating an expense
Update the CategoryItem Component
  • should keep all of the features described in lab-31
  • add an ExpenseForm to your category item that enables the user to create expenses on your app state
  • display a list of all the ExpenseItems belonging to the category
ExpenseForm Component
  • should have an onComplete prop that will be invoked with the form state onSubmit
  • should support an expense prop that will both set the initial form state, and update the state in the hook on componentWillReceiveProps()
  • should have a buttonText prop that will configure the submit buttons text
ExpenseItem Component
  • should have a button that will delete the expense from the Apps onClick
  • should display the name and price of the component
  • should display an ExpenseForm that will enable the user to update the expense in the app state

Test

  • Test your ExpenseForm and CategoryForm
  • Test all of your action creators
  • Test each reducer used in your combineReducers

Documentation

Write a description of the project in your README.md

32-combining-reducers's People

Contributors

izzybaer avatar sjschmidt44 avatar

Watchers

James Cloos avatar Hector N 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.