关于auth库,建议如下:1. ion_auth,基于Redux重写而成,非常不错的认证库,国外用的很多,几个最新的ci2.0.2基础上的开源系统(如doveforum)都用它,支持ci 2.0和以上,2010年的版本就已经稳定,目前仍然在更新。 优点:这个库除了用户认证,还搭建了简单的权限框架,支
分类:
其他好文 时间:
2016-02-20 11:58:56
阅读次数:
182
Code to be refacted: const AddTodo = (props, { store }) => { let input; return ( <div> <input ref={node => { input = node; }} /> <button onClick={() =
分类:
其他好文 时间:
2016-02-12 06:07:44
阅读次数:
304
Code to be refactored: class FilterLink extends Component { componentDidMount() { const { store } = this.context; this.unsubscribe = store.subscribe((
分类:
其他好文 时间:
2016-02-12 06:07:19
阅读次数:
374
We have to write a lot of boiler plate code to pass this chore down as a prop. But there is another way, using the advanced React feature called conte
分类:
其他好文 时间:
2016-02-06 01:43:25
阅读次数:
302
教程源代码及目录 https://github.com/lewis617/myReact 今天,我们要讲解的是自定义redux中间件这个知识点。本节内容非常抽象,特别是中间件的定义原理,那多层的函数嵌套和串联,需要极强逻辑思维能力才能完全消化吸收。不过我会多罗嗦几句,所以不用担心。 例子 例子是官方
分类:
其他好文 时间:
2016-02-02 17:34:13
阅读次数:
185
教程目录 react+redux教程(一)connect、applyMiddleware、thunk、webpackHotMiddleware react+redux教程(二)redux的单一状态树完全替代了react的状态机? react+redux教程(三)reduce()、filter()、m
分类:
其他好文 时间:
2016-02-01 14:34:42
阅读次数:
1362
教程目录 react+redux教程(一)connect、applyMiddleware、thunk、webpackHotMiddleware react+redux教程(二)redux的单一状态树完全替代了react的状态机? react+redux教程(三)reduce()、filter()、m
分类:
其他好文 时间:
2016-01-30 13:54:39
阅读次数:
15006
Learn how to avoid the boilerplate of passing the props down the intermediate components by introducing more container components. Code to be refactor
分类:
其他好文 时间:
2016-01-29 20:00:43
阅读次数:
208
Finally, I just noticed that the to-do app component doesn't actually have to be a class. I can turn it into a function. I prefer to-do that when poss
分类:
移动开发 时间:
2016-01-27 21:24:08
阅读次数:
269
Code to be refactored: let nextTodoId = 0; class TodoApp extends Component { render() { const { todos, visibilityFilter } = this.props; const visibleT
分类:
其他好文 时间:
2016-01-27 21:07:10
阅读次数:
197