You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
247 B
13 lines
247 B
/**
|
|
* 1.调用 createContext 方法
|
|
* 2.通过顶层组件包裹 Context.Provider
|
|
* 3.底层组件 useContext (createContext 返回的对象)
|
|
*/
|
|
|
|
import { createContext } from "react"
|
|
|
|
const Context = createContext()
|
|
|
|
export default Context
|
|
|
|
|