摘要: 创建一个上下文对象 // my-context.js import { createContext } from 'react'; export default createContext(null); 注入到 根组件中,并传入值 value // app.tsx import { useState 阅读全文
posted @ 2025-02-26 10:05 丁少华 阅读(29) 评论(0) 推荐(0)