摘要: 一、Socket.io是什么 是基于时间的实时双向通讯库 基于websocket协议的 前后端通过时间进行双向通讯 配合express快速开发实时应用 二、Socket.io和ajax区别 基于不同的网络协议 ajax基于http协议,单向,实时获取数据只能轮询 socket.io基于websock 阅读全文
posted @ 2018-11-26 11:38 文博的博客 阅读(743) 评论(0) 推荐(0) 编辑
摘要: 父组件 class userC extends React.Component{ handleClick(v){ this.props.history.push(`/chat/${v.user}`) }, render(){ return( <Card onClick={v=>this.handle 阅读全文
posted @ 2018-11-26 11:06 文博的博客 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 一、browser-cookies 地址:https://github.com/voltace/browser-cookies 用法 存放cookies是 cookies.set('firstName','Lisa') cookies.set('firstName','Lisa',{expires: 阅读全文
posted @ 2018-11-26 10:17 文博的博客 阅读(1092) 评论(0) 推荐(0) 编辑