• 首页
  • 关于
    • 前端行知录 photo

      前端行知录

      前端路漫漫,行知方知行

    • Email
    • Github
  • 文章
    • 所有文章
    • 所有标签
  • 作品

Redux 最佳实践

16 Aug 2016

Reading time ~1 minute

本文的灵感来自于 Redux 官网的 issue: Recommendations for best practices regarding action-creators, reducers, and selectors。总结了讨论内容的基础上并不断完善,以期为 Redux 使用者提供思路,构建更为健壮的应用。

  • Use selectors everywhere

  • Do more in action-creators and less in reducers

  • Use ImmutableJS

  • Do not nest objects in mapStateToProps and mapDispatchToProps

Redux

alcat2008

Dreamer, Practitioner, Incomplete Front-ender

← Redux 源码分析 JavaScript 继承和类 →