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

原文地址:https://www.cnblogs.com/xuzishuai/p/9116225.html