Blame view

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

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

export default useOpenModal;