Skip to content
Lemonpeel
Search
K
Main Navigation
hooks
GitHub
Appearance
GitHub
Menu
Return to top
On this page
Table of Contents for current page
createGlobalState
创建全局状态
代码演示
基础用法
API
javascript
const
useGlobalState
=
createGlobalState
<
T
>(defineState: ()
=>
T
): ()
=>
T
const
useGlobalState
=
createGlobalState
<
T
>(defineState: ()
=>
T
): ()
=>
T
Params
参数
说明
类型
默认值
defineState
必填,需要定义的全局变量
() => T
-