Submit Search
Upload
ReactMaker - state 製作購物車範例
•
Download as PPTX, PDF
•
0 likes
•
531 views
昇
昇倫 蔡
Follow
使用ReactJS的State來實作購物車網站
Read less
Read more
Software
Report
Share
Report
Share
1 of 23
Download now
Recommended
React - Reactstrap example
React - Reactstrap example
昇倫 蔡
Redux? 我覺得不行, 試試看 freestyle 的 Mobx
Redux? 我覺得不行, 試試看 freestyle 的 Mobx
reactmaker9527
ReactMaker start kit intro
ReactMaker start kit intro
昇倫 蔡
高雄前端上課簡報 #29
高雄前端上課簡報 #29
reactmaker9527
React.js what do you really mean?
React.js what do you really mean?
昱安 周
Hello reactJS 0~1 Bulid my first web app
Hello reactJS 0~1 Bulid my first web app
hungjie19
JSDC 2015 React-Native 實戰
JSDC 2015 React-Native 實戰
Sam Lee
React Native & V2HOT
React Native & V2HOT
Xcat Liu
Recommended
React - Reactstrap example
React - Reactstrap example
昇倫 蔡
Redux? 我覺得不行, 試試看 freestyle 的 Mobx
Redux? 我覺得不行, 試試看 freestyle 的 Mobx
reactmaker9527
ReactMaker start kit intro
ReactMaker start kit intro
昇倫 蔡
高雄前端上課簡報 #29
高雄前端上課簡報 #29
reactmaker9527
React.js what do you really mean?
React.js what do you really mean?
昱安 周
Hello reactJS 0~1 Bulid my first web app
Hello reactJS 0~1 Bulid my first web app
hungjie19
JSDC 2015 React-Native 實戰
JSDC 2015 React-Native 實戰
Sam Lee
React Native & V2HOT
React Native & V2HOT
Xcat Liu
React js入門
React js入門
昶宇 賴
React Native on Android
React Native on Android
萬皇 楊
react native by letv
react native by letv
feeloc
常用Js框架比较
常用Js框架比较
Adam Lu
React Native + Redux
React Native + Redux
Ch Rick
20141212 html5 及微軟跨平台佈局 long
20141212 html5 及微軟跨平台佈局 long
Meng-Ru (Raymond) Tsai
React基礎教學
React基礎教學
昇倫 蔡
Thinking in React by Deot
Thinking in React by Deot
荣德 周
《Linux运维趋势》2012年5月号 总第19期
《Linux运维趋势》2012年5月号 总第19期
51CTO
【1110ROS社群開講】實務經驗分享,初階也能快速上手!_林威志
【1110ROS社群開講】實務經驗分享,初階也能快速上手!_林威志
MAKERPRO.cc
React-Native share
React-Native share
Eddie Hsu
前端工程開發實務訓練
前端工程開發實務訓練
Joseph Chiang
JSDC 2019 給我一個放棄 React 的理由
JSDC 2019 給我一個放棄 React 的理由
Sam Lee
程序组介绍Ver2.0
程序组介绍Ver2.0
vtmers2012
Insider Dev Tour - Taipei Productive and Fun Web Development with NodeJS and ...
Insider Dev Tour - Taipei Productive and Fun Web Development with NodeJS and ...
jasonzheng50
Csdn Java电子杂志第1期
Csdn Java电子杂志第1期
yiditushe
Java Web框架汇总
Java Web框架汇总
yiditushe
Web爬虫那点事
Web爬虫那点事
Yihua Huang
A dev ops team's practice in trend micro in agile summit 2018
A dev ops team's practice in trend micro in agile summit 2018
Juggernaut Liu
行動技術開發概論
行動技術開發概論
My own sweet home!
More Related Content
Similar to ReactMaker - state 製作購物車範例
React js入門
React js入門
昶宇 賴
React Native on Android
React Native on Android
萬皇 楊
react native by letv
react native by letv
feeloc
常用Js框架比较
常用Js框架比较
Adam Lu
React Native + Redux
React Native + Redux
Ch Rick
20141212 html5 及微軟跨平台佈局 long
20141212 html5 及微軟跨平台佈局 long
Meng-Ru (Raymond) Tsai
React基礎教學
React基礎教學
昇倫 蔡
Thinking in React by Deot
Thinking in React by Deot
荣德 周
《Linux运维趋势》2012年5月号 总第19期
《Linux运维趋势》2012年5月号 总第19期
51CTO
【1110ROS社群開講】實務經驗分享,初階也能快速上手!_林威志
【1110ROS社群開講】實務經驗分享,初階也能快速上手!_林威志
MAKERPRO.cc
React-Native share
React-Native share
Eddie Hsu
前端工程開發實務訓練
前端工程開發實務訓練
Joseph Chiang
JSDC 2019 給我一個放棄 React 的理由
JSDC 2019 給我一個放棄 React 的理由
Sam Lee
程序组介绍Ver2.0
程序组介绍Ver2.0
vtmers2012
Insider Dev Tour - Taipei Productive and Fun Web Development with NodeJS and ...
Insider Dev Tour - Taipei Productive and Fun Web Development with NodeJS and ...
jasonzheng50
Csdn Java电子杂志第1期
Csdn Java电子杂志第1期
yiditushe
Java Web框架汇总
Java Web框架汇总
yiditushe
Web爬虫那点事
Web爬虫那点事
Yihua Huang
A dev ops team's practice in trend micro in agile summit 2018
A dev ops team's practice in trend micro in agile summit 2018
Juggernaut Liu
行動技術開發概論
行動技術開發概論
My own sweet home!
Similar to ReactMaker - state 製作購物車範例
(20)
React js入門
React js入門
React Native on Android
React Native on Android
react native by letv
react native by letv
常用Js框架比较
常用Js框架比较
React Native + Redux
React Native + Redux
20141212 html5 及微軟跨平台佈局 long
20141212 html5 及微軟跨平台佈局 long
React基礎教學
React基礎教學
Thinking in React by Deot
Thinking in React by Deot
《Linux运维趋势》2012年5月号 总第19期
《Linux运维趋势》2012年5月号 总第19期
【1110ROS社群開講】實務經驗分享,初階也能快速上手!_林威志
【1110ROS社群開講】實務經驗分享,初階也能快速上手!_林威志
React-Native share
React-Native share
前端工程開發實務訓練
前端工程開發實務訓練
JSDC 2019 給我一個放棄 React 的理由
JSDC 2019 給我一個放棄 React 的理由
程序组介绍Ver2.0
程序组介绍Ver2.0
Insider Dev Tour - Taipei Productive and Fun Web Development with NodeJS and ...
Insider Dev Tour - Taipei Productive and Fun Web Development with NodeJS and ...
Csdn Java电子杂志第1期
Csdn Java电子杂志第1期
Java Web框架汇总
Java Web框架汇总
Web爬虫那点事
Web爬虫那点事
A dev ops team's practice in trend micro in agile summit 2018
A dev ops team's practice in trend micro in agile summit 2018
行動技術開發概論
行動技術開發概論
ReactMaker - state 製作購物車範例
1.
ShoppingCart React - state By
ReactMaker - Andy
2.
關於我們
3.
成員介紹 Andy 一頭栽進前端世界的小小工程師,喜歡 玩各種前端新鮮事物。 目前專注於 ReactJS,使用過Flux、Redux、Mobx 等單向資料流進行專案開發。 Giant 在團隊中擔任聯絡窗口,目前是高應大 碩生,由於對前端開發有興趣,因此就 跟大大們一起組成讀書會,專注於學習 ReactJs。 Hyman 前端工程師,喜歡研究新的技術,也喜 歡研究有趣的UI跟效果,想要帶領更多 的人進入ReactJS的世界,最近在研究 Mobx.js!
4.
前情提要 https://github.com/ReactMaker/reactstrap_example
5.
這次我們要做的是 https://github.com/ReactMaker/shopping_cart_demo
6.
What is state? 狀態是Component的內部物件 儲存了可變動的資料 讓Component自己管理DOM元件的生成及變動
7.
Data render jQuery 需要的值從DOM抓取 並直接修改DOM $(selector).text(“text1”) 資料導向,以state產生畫面 無直接對DOM進行操作 <span>{this.state.text}</span>React
8.
海門 Hyman 用愛心來做事,用感恩的心做人 迪倫 Andy 人永遠在追求快活,永遠在逃避痛苦 及米
Jimmy 信念、毅力、勇氣三者具備 小森 Winsome 互相瞭解是朋友,互相理解是知己 x { name: '海門 Hyman', desc: '用愛心來做事,用感恩的心做人' } 海綿 Hyman 用愛心來做事,用感恩的心做人 { name: '海綿 Hyman', desc: '用愛心來做事,用感恩的心做人' } React Render
9.
Render 畫面 state {count: 1} render 1 setState {count:
2} 1 2 3 2 簡單做個state示範吧
10.
DEMO 來把它弄活吧
11.
Step 1 取得API Data https://goo.gl/jNEnKV
12.
Step 2 建立cart state 顯示購物車物品數量 https://goo.gl/MDbA1i
13.
Step 3 新增addToCart function https://goo.gl/UGRbQt
14.
Step 4 購買按鈕綁定addToCart function https://goo.gl/63kckr
15.
Step 5 購買後disabled https://goo.gl/d2Zm5T
16.
Step 6 購物車呈現購買物品 https://goo.gl/61aAZw
17.
Step 7 計算總金額 https://goo.gl/tbVyba
18.
Step 8 購物車加入刪除按鈕 https://goo.gl/dZHGrr
19.
Step 9 購物車無商品時 不能點擊結帳按鈕 https://goo.gl/BC1Vpg
20.
Step 10 點擊結帳按鈕 顯示總金額 https://goo.gl/MjsvdZ
21.
What is props? props是唯讀的且單向的 由父component傳給子component <User
name={this.state.name} /> props props props props
22.
切Component carts deleteCartItem products addToCart
23.
別忘了追蹤我們
Download now