-
Create React App
-
Project Development Workflow
- Create Google Spreadsheet
- Add columns Feature, Description, State, and Duration
- Enter Product Component, show list f product, and open, 2
- Add Time ? Hours, Rate 30 USD/Hours, cost ? USD
- Add All Features
- Create Github account
- Create new repository
- Add it as remote repository in VS Code
- Commit changes on github
- Push changes on github
- Start => create new feature Feature 1 in google spreadsheet
- Create a new branch feature-1 for testing the workflow
- Add "// branch feature-1 in App.js line 1
- commit with message "feature 1"
- Click publish changes
- Open respository page on github
- Create pull request
- Merge pull request .
-
Cart Component
- Set active task management spreadsheet
- Create branch cart-component
- Product.js
- Handle "Add To Cart" to this.props.addToCart(product)
- App.js
- Add cartItems to state as []
- Create addToCart(product)
- Slice, Check product existance, add to cartItems
- Cart.js
- Define cartItems, order from this.props
- Check cartItems.length and show message
- List cartItems {cartItems.length > 0 &&}
- index.css
- Style cart, cart-header, cart-items (img, li)
- Use localStorage on App constructor to load cart items (JSON.parse)
- Use LocalStorage on addToCart to save cart items (JSON.stringify)
-
Checkout Form
- Set active task spreadsheet
- Create branch checkout-form
- Cart.js
- Make cart items persistent
- Use LocalStorage on App constructor to load cart items (JSON.parse)
- Use localstorage on addCart to save cart item (JSON.stringify)
- Handle click n process
- Update showCheckOut state to true on click
- Conditional rendering Checkout form
- Get Email, Name, and Address required input
- Define handleInput function
- Add checkout button
- Handle onSubmit form Event by this.createOrder
- Create order object and pass to parent to handle it
- Publish changes
- Pull request, merge, change to master
- Task management spreadsheet set it done
-
Add Modal and Animation
- Set active task management spreedsheet
- Cretate branch animation-modal
- Show animation
- Install react-reveal
- Create fade effect from bottom for products
- Create fade left for add to cart
- Create fade right for show checkout form
- Open modal by click on prodcut image
- Install react-modal
- Products.js
- Import modal
- Set state for prodcut to null
- Define openModal and closeModal
- Show Modal if product exist
- Create Modal
- Create Modal
- Index.css
- Style product details
- Commit and publish changes
- Pull request, merge, change to master
- Task management spreedsheet set it to done.
-
Create Product Backend
- Install nodemon globally
- Add server.js
- Install express body-parser mongoose shortid
- Install MongoDB
- app = express()
- app.use(bodyParser.Json())
- mongoose.connect()
- create product model
- app.post("/api/products")
- Postman send post request
- route.get("/api/products")
- route.delete("/api/products/:id")
-
Add Redux
- What is redux?
- Uodate task on spreedsheet
- create branch add-redux-products
- npm install redux react-redux redux-thunk
- create types
- types.js
- define FETCH_PRODUCTS
- actions/productActions.js
- declare fetchProducts
- create reducers
- reducers/productReducers.js
- define case FETCH_PRODUCTS
- create store
- store.js
- import redux
- set initial state
- define initialState
- create store
- import productReducers
- combine reducers
- use store
- App.js
- import store
- wrap all in provider
- connect producers
- components/producer.js
- connect to store
- import fetchProducts
- set state products to null
- fetch products from did Mount
- package.json
- set proxy to http://127.0.0.1:5000
- npm run server
- check products lsit
- commit and publish
- send pull request and merge
- update spreedsheet
-
Add Redux To Filter
- Update task and branch
- types.js
- create FILTER_PRODUCTS_BY_SIZE
- create ORDER_PRODUCTS_BY_PRICE
- action/productActions.js
- create filterProducts
- move app.js filterProducts logic here
- create sortProducts
- move app.js filterProducts logic here
- reducers/productReducers.js
- case FILTER_PRODUCTS_BY_SIZE
- case ORDER_PRODUCTS_BY_PRICE
- Filter.js
- connect props: size, sort, items and filteredItems
- connect action: filterProduct and sortProducts
- show loading if no filterProducts
- App.js
- remove Filter props
- check result
- update task and branch
shopping-cart's Introduction
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.