摘要: 1. 要在constructor-super里接收context对象 2. 给组件(class / pure function)指定contextType属性,用来接收store对象 以下代码模拟了connect(类似react-redux里connect的功能)高阶组件的实现: 阅读全文
posted @ 2019-08-19 18:58 sophel 阅读(2278) 评论(0) 推荐(0) 编辑