You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
256 B
13 lines
256 B
// 全局共享数据示例
|
|
import { DEFAULT_NAME } from '@/constants';
|
|
import { useState } from 'react';
|
|
|
|
const useUser = () => {
|
|
const [name, setName] = useState<string>(DEFAULT_NAME);
|
|
return {
|
|
name,
|
|
setName,
|
|
};
|
|
};
|
|
|
|
export default useUser;
|