-
數(shù)據(jù)流:用戶行為和響應(yīng)的關(guān)系查看全部
-
container和component查看全部
-
redux概述查看全部
-
container & component查看全部
-
action //普通js對(duì)象 //一般是由方法生成 必須有一個(gè)type const addTodo = (text) => { return { type:'add_todo', id:nextToodId++, text } } reducer 響應(yīng)的抽象 const todo = (state,action) => { switch(action.type){ case : 'add_todo': return{ id:action.id, text:action.text, } } }查看全部
-
--actions 行為 --components --container --reducer store中負(fù)責(zé)分發(fā)action 的地方 --server.js查看全部
-
npm install reactr-redux(利用react來實(shí)現(xiàn)redux) redux redux獨(dú)立的是一個(gè)工作流 http://redux.js.org查看全部
-
react.createClass() this.props 屬性(父子組件之間傳遞信息) this.state 狀態(tài)() render() 生命周期查看全部
-
組件container與component區(qū)別查看全部
-
component與數(shù)據(jù)流向無關(guān),查看全部
-
container與業(yè)務(wù)緊密相關(guān),不容易被復(fù)用; component 可被復(fù)用查看全部
-
純方法:不依賴系統(tǒng)的狀態(tài),當(dāng)前的時(shí)間及其他的外界因素,止于所傳遞的參數(shù)有關(guān); 非純方法:與純方法對(duì)應(yīng)查看全部
-
action : 1、行為的抽象; 2、普通JS對(duì)象; 3、一般由方法生成; 4、必須有一個(gè)type查看全部
-
數(shù)據(jù)流查看全部
-
擴(kuò)展知識(shí): 1.react-redux:除了react綁定,還有ng,ng2,backbone,deku; 2.redux-thunk:實(shí)現(xiàn)異步(ajax調(diào)用)action; 3.redux-gen:利用生成器,實(shí)現(xiàn)middleware(第三方擴(kuò)展)也可實(shí)現(xiàn)異步; 4.react-router-redux:路由與數(shù)據(jù)流; 5.react-redux-form:表單提交用的第三方擴(kuò)展; 6.function優(yōu)先于ES6,Class優(yōu)先于React.createClass(下圖左側(cè)為ES6,右側(cè)為react寫法)查看全部
舉報(bào)
0/150
提交
取消