摘要: function trim(str){ str = str.replace(/^\s+/,""); str = str.replace(/\s+$/,""); return str; } 阅读全文
posted @ 2017-07-09 22:00 YiRan2011 阅读(618) 评论(0) 推荐(0) 编辑
摘要: Redux 和 React 没有直接关系,它瞄准的目标是应用状态管理。 核心概念是 Map/Reduce 中的 Reduce。且 Reducer 的执行是同步,产生的 State 是 Immutable 的。 改变 State 只能通过向 Reducer dispatch actions 来完成。 阅读全文
posted @ 2017-07-02 21:13 YiRan2011 阅读(72) 评论(1) 推荐(0) 编辑