UNPKG
@startpage/local-storage
Version:
latest (0.2.6)
0.2.6
0.2.4
0.2.2
0.2.0
0.1.2
0.1.1
0.1.0-alpha.14
0.1.0-alpha.13
0.1.0-alpha.12
0.1.0-alpha.10
0.1.0-alpha.9
0.1.0-alpha.8
0.1.0-alpha.2
0.1.0-alpha.1
0.1.0-alpha.0
Local storage management for your startpage
prettycoffee.github.io/startpage
PrettyCoffee/startpage
@startpage/local-storage
/
lib
/
useStorage
/
useStorage.d.ts
5 lines
(4 loc)
•
239 B
TypeScript
View Raw
1
2
3
4
5
import
{
SetStateAction
,
Dispatch
}
from
"react"
;
type
StateSetter
<T> =
Dispatch
<
SetStateAction
<T>>;
export
declare
const
useStorage
: <
ValueType
>
(
key
:
string
,
initialValue
:
ValueType
) =>
[
ValueType
,
StateSetter
<
ValueType
>];
export
{};