08 2017 档案
摘要:constructor(props) 在创建组件实例的时候调用一次。 componentWillMount() It is called before render(), therefore setting state synchronously in this method will not tr
阅读全文
摘要:Redux介绍 单一数据源 整个单页应用的 state 都被储存在store的内部,可以通过store.getState()获取,再作为props传给对应的组件。 state应该尽量少嵌套扁平化,通过id相互引用数据。 State 为只读 为防止出现race condition和deep equal
阅读全文