React Context
创建外部context文件
通过React.createContext创建全局的GlobalContext(来创建一个context)

引用外部context文件
在根组件中通过GlobalContext.Provider创建一个全局的生成者
GlobalContext.Provide中有一个属性value 用来定义子组件所需要用到的状态值

在子组件引用外部context文件,并在子组件中通过GlobalContext.Consumer来创建消费者。GlobalContext.Consumer内部必须通过一个函数来接收生产者的状态
这个函数必须返回一个jsx语法
