Blame view

src/models/count.ts 223 Bytes
boyang authored
1
2
3
4
// 全局共享数据示例
import { useState } from 'react';

const useOpenModal = () => {
boyang authored
5
  const [openCount, setOpenCount] = useState(0);
boyang authored
6
7
8
9
10
11
12
  return {
    openCount,
    setOpenCount,
  };
};

export default useOpenModal;