Ts+react

樊小烦
  • 72

Ts报错怎么解决?
2407414ca2f28a22018595fad4db2e3.png

ea34b4e3064a0460ca7b6a578d91322.png

回复
阅读 684
1 个回答
interface IContext {
   visible: boolean;
   setVisible: (visible: boolean) => void;
}

const context = React.createContext<
  IContext | undefined
>(undefined);