GithubHelp home page GithubHelp logo

31-redux's Introduction

cf 31: Budget Tracker

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

Learning Objectives

  • Students will learn to create frontend routes using react-router-dom
  • Students will learn to restructure their applications into modules
  • Students will learn the difference between view state and application state
  • Students will learn to lift application state to better control one way data flow
  • Students will learn to create and import sass partials

Requirements

Configuration

Your lab directory must include

  • README.md -- with documention about your lab
  • .babelrc -- with all dependencies and dev-dependencies
  • .eslintrc.json -- with the class .eslintrc.json file
  • .gitignore -- with a robust .gitignore
  • .eslintignore -- with the class .eslintignore
  • yarn.lock -- with the yarn lockfile
  • package.json -- with all dependencies and dev-dependencies
  • webpack.config.js -- with webpack config
  • src/ -- containing the frontend code
  • src/main.js -- for appending your app to the DOM
  • src/action/ -- containing your action creators
  • src/reducer/ -- containing your reducers
  • src/lib/ -- containing your redux
  • src/component/ -- containing your component folders
  • src/component/app/index.js -- containing App component, provider, browser router, and route to

Feature Tasks

category
  • in this app a category should contain at least the following properties
    • id a uuid
    • timestamp a date from when the category was created
    • name a string that is the name of the category
    • budget a number that is the total amount of $ in the category
    • feel free to add more to your categories
redux
reducer
  • create a category reducer in your reducer directory
  • this reducer should support the following interactions
    • CATEGORY_CREATE
    • CATEGORY_UPDATE
    • CATEGORY_DESTORY
action creators
  • you should create an action creator for each interaction supported by your category reducer
store
  • in lib/store.js export a function that will return a new redux store from your category reducer
Components

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

App
  Provider
    BrowserRouter
      Route / Dashboard
        CategoryForm -- for creating categories
        [Category Item]
           CategoryForm  -- for updating categories
App Component

The App component should set up the Provider for the redux store and the Router.

Dashboard Component
  • should be displayed on the / route
  • should use react-redux's connect to map state and dispatchable methods to props
  • should display a CategoryForm for adding categories to the app state
  • should display a CategoryItem for each category in the app state
CategoryForm Component
  • should expect an onComplete prop to be a function
    • that function should be invoked with the CategoryForms state when the form is submitted
  • should expect a buttonText prop to configure the submit buttons text
  • should support an optional category prop that will initialize the state of the form
CategoryItem Component
  • should display the category's name and budget
  • should display a delete button
    • onClick the category should be removed from the application state
  • should display a CategoryForm
    • onComplete the form should update the component in the application state

Documentation

Write a description of the project in your README.md

31-redux's People

Contributors

izzybaer avatar sjschmidt44 avatar

Watchers

 avatar  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.