user webfix rules...

This commit is contained in:
Gabe Yuan
2023-11-13 18:03:38 +08:00
parent 6e06fe79cd
commit 2d651abfdd
8 changed files with 337 additions and 32 deletions

View File

@@ -1,6 +1,12 @@
import { useCallback, useEffect, useState } from "react";
import { storage } from "../libs/storage";
/**
*
* @param {*} key
* @param {*} defaultVal 需为调用hook外的常量
* @returns
*/
export function useStorage(key, defaultVal) {
const [loading, setLoading] = useState(false);
const [data, setData] = useState(null);