摘要: We will create an anction creator to manage the dispatch actions, to keep code maintainable and self-documenting by extracting action creators from th 阅读全文
posted @ 2016-02-12 03:32 Zhentiw 阅读(228) 评论(0) 推荐(0)
摘要: Code to be refactored: class FilterLink extends Component { componentDidMount() { const { store } = this.context; this.unsubscribe = store.subscribe(( 阅读全文
posted @ 2016-02-12 03:15 Zhentiw 阅读(360) 评论(0) 推荐(0)
摘要: Code to be refacted: const AddTodo = (props, { store }) => { let input; return ( <div> <input ref={node => { input = node; }} /> <button onClick={() = 阅读全文
posted @ 2016-02-12 02:43 Zhentiw 阅读(489) 评论(0) 推荐(0)