react零碎代码

案例1

import { useParams, useSearchParams } from "react-router-dom";
  const [searchParams, setSearchParams] = useSearchParams();
  console.log("searchParams", searchParams.get("token"));

案例2

const { data: guessesData } = useFetch(
    () =>
      getGuesses({
        p: gameHistoryPageIndex,
        p_size: pageSize,
        category: "P",
        min_type:_minType,
      }),
    {
      refreshDeps: [gameHistoryPageIndex, gameCode],
    }
  );
posted @ 2024-11-13 15:54  小陈皮皮  阅读(11)  评论(0)    收藏  举报