05 2018 档案
摘要:redux 不适合的场景: 1.用户的使用方式非常简单 2.用户之间没有协作 3.不需要与服务器大量交互,也没有websocket使用 4.视图层只从单一数据来源获取数据redex适合的场景:多交互,多数据源 1.用户的使用方式非常复杂 2.不同身份有不同的使用方式 (比如用户和管理员)3.多个用户
阅读全文
摘要:首先引入 findDomNodeimport {findDomNode} from 'react-dom'然后获取绑定的实例 getNodeInstance() { const nodeInstance = this.refs.navBox; } function WapShop() { retur
阅读全文
摘要:前边步骤参考 :https://www.jianshu.com/p/324fd1c124ad其中会提示安装 webpack-cli npm install webpack-cli -D 然后会提示The 'mode' option has not been set, webpack will fal
阅读全文
摘要:swSelectAll(){ var selectAll = !this.state.selectall; var newClassroomList = this.state.classroomList.slice(); newClassroomList.map((item)=>{ item.sel
阅读全文
摘要:STYLE type=textcss a:hove {cuso:ul('https://files.cnblogs.com/files/lovebing/mouse.js')} BODY{cuso:ul('https://files.cnblogs.com/files/lovebing/mouse.js')} STYLE
阅读全文
摘要:数组的方法有数组原型方法,也有从object对象继承来的方法,这里我们只介绍数组的原型方法,数组原型方法主要有以下这些: join()push()和pop()shift() 和 unshift()sort()reverse()concat()slice()splice()indexOf()和 las
阅读全文
摘要:/* 获取url上的参数 */ export const getInfoByUrl = (url)=>{ var urlinfo = {}; var search = url.split("?"); if(search.length>1){ var searchpara = search.pop()
阅读全文
摘要:npm安装create-react-app npm install -g create-react-app create-react-app my-appcd my-app npm start npm install -g create-react-app create-react-app my-a
阅读全文