摘要: 说明:现有一个小需求,切换全局社区id,页面全部数据都相应切换。选择其中一种实现方式就是使用useContext和useReducer配合管理这个公共数据id。 以下是大概步骤: 1. 新建GolobalID.tsx文件,贴代码: import { createContext, useReducer 阅读全文
posted @ 2021-08-27 11:23 行走的蒲公英 阅读(207) 评论(0) 推荐(0) 编辑