zhengyiming
9 天以前 0b0a35f9d78e0c03ccdd6ca94d9855787b208b59
1
2
3
4
5
6
7
8
9
10
11
12
13
// 全局共享数据示例
import { DEFAULT_NAME } from '@/constants';
import { useState } from 'react';
 
const useUser = () => {
  const [name, setName] = useState<string>(DEFAULT_NAME);
  return {
    name,
    setName,
  };
};
 
export default useUser;