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
alcat2008
Dreamer, Practitioner, Incomplete Front-ender