React跨主件

 

Context

上下文
Provider
Consumer
语法:export const AuthContext = React.createContext({
	user:null
})