会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小儿打破贼
博客园
首页
新随笔
联系
订阅
管理
2016年11月25日
React Tips
摘要: 1.Class切换 (1)在constructor里定义初始状态 相当于开关 给个初始赋值 然后在回调函数中进行切换 constructor(props) { super(props); this.confirm = this.confirm.bind(this); this.state={ bOK
阅读全文
posted @ 2016-11-25 16:38 小儿打破贼
阅读(119)
评论(0)
推荐(0)
2016年11月22日
React createClass 和 Component 有什么区别?
摘要: 以前是这样写的: 用 React.Component: React在ES6的实现中去掉了getInitialState这个hook函数,规定state在constructor中实现,如下: Class App extends React.Component {
阅读全文
posted @ 2016-11-22 11:53 小儿打破贼
阅读(746)
评论(0)
推荐(0)
2016年11月21日
React入坑之路(一)
摘要: 1.funciton mapStateToProps(state){ console.log("Data page:",state) //每个界面都可以打印出所有的state或者部分 const{davices,locations,batterystate} = state;//从所有的state里
阅读全文
posted @ 2016-11-21 11:30 小儿打破贼
阅读(152)
评论(0)
推荐(0)
2016年9月13日
移动端的无缝滚动+下拉刷新+定向滑动
摘要: <!DOCTYPE html><html lang="en"><head> <script> (function(){ function setFont(){ document.documentElement.style.fontSize=document.documentElement.clien
阅读全文
posted @ 2016-09-13 23:22 小儿打破贼
阅读(1109)
评论(0)
推荐(0)
公告