react context

在 Container.childContextTypes 中进行接口的声明,通过 getChildContext 返回更新后的state,在 Child.contextTypes 中声明要获取的接口,这样在子组件内部就能通过 this.context 获取到。通过 Context 这样一个中间对象,ChildOne 和 ChildTwo 就可以相互通信了。

最后付个链接:https://segmentfault.com/a/1190000012575622

mobx核心:https://yq.aliyun.com/articles/147474?t=t1

https://blog.csdn.net/slowlifes/article/details/77141948

posted @ 2018-05-31 13:28  点点圈圈一个夏天  阅读(103)  评论(0编辑  收藏  举报