React-Redux填坑

这篇东西以后慢慢补充。

Q:今天遇到一个问题是 TypeError:dispatch is not a function

A:一直报这个type error,调试了好一阵,最后在tof上看到网友说connect方法不能只传 mapdispatchtoprops这个参数

connect(mapstatetoprops,mapdispatchtoprops)(CitySelector)才正确

R:因为展示某城市的天气信息这个demo中,选择城市这个组件不需要跟踪state的更新,所以我在connect中没有传mapstatetoprops。

--2017/9/15