{"id":3621,"date":"2026-10-30T05:59:47","date_gmt":"2026-10-29T20:59:47","guid":{"rendered":"https:\/\/qol-kk.com\/wp2\/?p=3621"},"modified":"2026-10-30T05:59:47","modified_gmt":"2026-10-29T20:59:47","slug":"20260914-00mu0ks1","status":"publish","type":"post","link":"https:\/\/qol-kk.com\/wp2\/blog\/2026\/10\/30\/20260914-00mu0ks1\/","title":{"rendered":"TanStack Query \u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u6226\u7565\u3068 staleTime \u5165\u9580"},"content":{"rendered":"<h2>\u6982\u8981<\/h2>\n<p>React \u3067\u30b5\u30fc\u30d0\u30fc\u306e\u72b6\u614b\uff08\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u53d6\u3063\u3066\u304f\u308b\u30c7\u30fc\u30bf\uff09\u3092\u6271\u3046\u3068\u304d\u3001<code>useState<\/code> \u3068 <code>useEffect<\/code> \u3067\u81ea\u524d\u5b9f\u88c5\u3059\u308b\u3068\u3001\u30ed\u30fc\u30c7\u30a3\u30f3\u30b0\u30fb\u30a8\u30e9\u30fc\u7ba1\u7406\u30fb\u518d\u53d6\u5f97\u30fb\u30ad\u30e3\u30c3\u30b7\u30e5\u30fb\u91cd\u8907\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u6392\u9664\u306a\u3069\u3092\u6bce\u56de\u66f8\u304f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002TanStack Query\uff08\u65e7 React Query\uff09\u306f\u3053\u308c\u3089\u3092\u307e\u3068\u3081\u3066\u5f15\u304d\u53d7\u3051\u3066\u304f\u308c\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u4e2d\u3067\u3082\u521d\u5b66\u8005\u304c\u6700\u521d\u306b\u3064\u307e\u305a\u304f\u306e\u304c <code>staleTime<\/code>\uff08\u30b9\u30c6\u30a4\u30eb\u30bf\u30a4\u30e0\uff09\u3068 <code>gcTime<\/code>\uff08\u65e7 <code>cacheTime<\/code>\uff09\u306e\u9055\u3044\u3067\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u72b6\u614b\u9077\u79fb\u3092\u8ef8\u306b\u3001\u306a\u305c\u300c\u53d6\u5f97\u3057\u305f\u3070\u304b\u308a\u306a\u306e\u306b\u518d\u30d5\u30a7\u30c3\u30c1\u304c\u8d70\u308b\u300d\u306e\u304b\u3092\u6574\u7406\u3057\u307e\u3059\u3002\u5bfe\u8c61\u306f TanStack Query v5 \u3067\u3059\u3002<\/p>\n<h2>\u74b0\u5883<\/h2>\n<ul>\n<li>React 18<\/li>\n<li>TanStack Query v5\uff08<code>@tanstack\/react-query<\/code>\uff09<\/li>\n<li>TypeScript<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true\">npm install @tanstack\/react-query<\/pre>\n<h2>\u524d\u63d0\uff1aQueryClient \u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/h2>\n<p>\u307e\u305a\u30a2\u30d7\u30ea\u306e\u30eb\u30fc\u30c8\u3067 <code>QueryClientProvider<\/code> \u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">import { QueryClient, QueryClientProvider } from \"@tanstack\/react-query\";\n\nconst queryClient = new QueryClient();\n\nexport function App() {\n  return (\n    &lt;QueryClientProvider client={queryClient}&gt;\n      &lt;Todos \/&gt;\n    &lt;\/QueryClientProvider&gt;\n  );\n}<\/pre>\n<p>\u57fa\u672c\u7684\u306a\u30c7\u30fc\u30bf\u53d6\u5f97\u306f <code>useQuery<\/code> \u3067\u66f8\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">import { useQuery } from \"@tanstack\/react-query\";\n\nfunction Todos() {\n  const { data, isPending, isError } = useQuery({\n    queryKey: [\"todos\"],\n    queryFn: () =&gt; fetch(\"\/api\/todos\").then((res) =&gt; res.json()),\n  });\n\n  if (isPending) return &lt;p&gt;Loading...&lt;\/p&gt;;\n  if (isError) return &lt;p&gt;Error&lt;\/p&gt;;\n\n  return (\n    &lt;ul&gt;\n      {data.map((t: { id: number; title: string }) =&gt; (\n        &lt;li key={t.id}&gt;{t.title}&lt;\/li&gt;\n      ))}\n    &lt;\/ul&gt;\n  );\n}<\/pre>\n<p><code>queryKey<\/code> \u306f\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4e00\u610f\u306b\u8b58\u5225\u3059\u308b\u30ad\u30fc\u3067\u3059\u3002\u540c\u3058\u30ad\u30fc\u306e <code>useQuery<\/code> \u306f\u540c\u3058\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5171\u6709\u3057\u307e\u3059\u3002<\/p>\n<h2>\u767a\u751f\u3057\u304c\u3061\u306a\u554f\u984c<\/h2>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u306e\u307e\u307e\u4f7f\u3046\u3068\u3001\u3053\u3093\u306a\u6319\u52d5\u306b\u300c\u306a\u305c\uff1f\u300d\u3068\u306a\u308a\u304c\u3061\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u30bf\u30d6\u3092\u5207\u308a\u66ff\u3048\u3066\u30d6\u30e9\u30a6\u30b6\u306b\u623b\u3063\u3066\u304f\u308b\u305f\u3073\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u98db\u3076<\/li>\n<li>\u5225\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u30de\u30a6\u30f3\u30c8\u3055\u308c\u308b\u305f\u3073\u306b\u540c\u3058\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u76f4\u3059<\/li>\n<li>\u300c\u3055\u3063\u304d\u53d6\u3063\u305f\u3070\u304b\u308a\u306a\u306e\u306b\u300d\u307e\u305f API \u3092\u53e9\u3044\u3066\u3044\u308b<\/li>\n<\/ul>\n<p>\u3053\u308c\u306f TanStack Query \u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u304c <strong><code>staleTime: 0<\/code><\/strong> \u3060\u304b\u3089\u3067\u3059\u3002\u53d6\u5f97\u76f4\u5f8c\u304b\u3089\u30c7\u30fc\u30bf\u306f\u300cstale\uff08\u53e4\u3044\uff09\u300d\u3068\u307f\u306a\u3055\u308c\u3001\u518d\u53d6\u5f97\u306e\u30c8\u30ea\u30ac\u30fc\uff08\u30d5\u30a9\u30fc\u30ab\u30b9\u5fa9\u5e30\u30fb\u518d\u30de\u30a6\u30f3\u30c8\u306a\u3069\uff09\u304c\u6765\u308b\u3068\u88cf\u3067\u518d\u30d5\u30a7\u30c3\u30c1\u304c\u8d70\u308a\u307e\u3059\u3002<\/p>\n<h2>\u539f\u56e0\uff1a<code>staleTime<\/code> \u3068 <code>gcTime<\/code> \u306f\u5225\u7269<\/h2>\n<p>\u540d\u524d\u306f\u4f3c\u3066\u3044\u307e\u3059\u304c\u5f79\u5272\u304c\u9055\u3044\u307e\u3059\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u8a2d\u5b9a<\/th>\n<th>\u610f\u5473<\/th>\n<th>\u30c7\u30d5\u30a9\u30eb\u30c8<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>staleTime<\/code><\/td>\n<td>\u30c7\u30fc\u30bf\u304c\u300c\u65b0\u9bae\uff08fresh\uff09\u300d\u3067\u3044\u3089\u308c\u308b\u6642\u9593\u3002\u3053\u306e\u9593\u306f\u518d\u53d6\u5f97\u3057\u306a\u3044<\/td>\n<td><code>0<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>gcTime<\/code><\/td>\n<td>\u4f7f\u308f\u308c\u306a\u304f\u306a\u3063\u305f\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30e1\u30e2\u30ea\u304b\u3089\u6368\u3066\u308b\u307e\u3067\u306e\u6642\u9593<\/td>\n<td><code>5\u5206<\/code>\uff08300000ms\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306f\u6b21\u306e\u72b6\u614b\u3092\u6301\u3061\u307e\u3059\u3002<\/p>\n<ul>\n<li><strong>fresh\uff08\u65b0\u9bae\uff09<\/strong>: <code>staleTime<\/code> \u5185\u3002\u518d\u53d6\u5f97\u306e\u30c8\u30ea\u30ac\u30fc\u304c\u6765\u3066\u3082\u518d\u30d5\u30a7\u30c3\u30c1\u3057\u306a\u3044<\/li>\n<li><strong>stale\uff08\u53e4\u3044\uff09<\/strong>: <code>staleTime<\/code> \u3092\u904e\u304e\u305f\u72b6\u614b\u3002\u30c8\u30ea\u30ac\u30fc\u304c\u6765\u308b\u3068\u88cf\u3067\u518d\u30d5\u30a7\u30c3\u30c1\u3059\u308b\uff08\u305d\u306e\u9593\u3082\u53e4\u3044\u30c7\u30fc\u30bf\u306f\u8868\u793a\u3055\u308c\u7d9a\u3051\u308b\uff09<\/li>\n<\/ul>\n<p>\u305d\u3057\u3066\u300c\u305d\u306e\u30af\u30a8\u30ea\u3092\u4f7f\u3063\u3066\u3044\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c1\u3064\u3082\u306a\u304f\u306a\u3063\u305f\u300d\u72b6\u614b\u3092 <strong>inactive<\/strong> \u3068\u547c\u3073\u3001inactive \u306b\u306a\u3063\u3066\u304b\u3089 <code>gcTime<\/code> \u304c\u7d4c\u904e\u3059\u308b\u3068\u30ad\u30e3\u30c3\u30b7\u30e5\u81ea\u4f53\u304c\u7834\u68c4\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3056\u3063\u304f\u308a\u8a00\u3046\u3068\uff1a<\/p>\n<ul>\n<li><code>staleTime<\/code> = <strong>\u3044\u3064\u53d6\u308a\u76f4\u3059\u304b<\/strong>\u3092\u6c7a\u3081\u308b<\/li>\n<li><code>gcTime<\/code> = <strong>\u3044\u3064\u6368\u3066\u308b\u304b<\/strong>\u3092\u6c7a\u3081\u308b<\/li>\n<\/ul>\n<p>\u3053\u306e2\u3064\u3092\u6df7\u540c\u3059\u308b\u3068\u300c<code>gcTime<\/code> \u3092\u4f38\u3070\u3057\u305f\u306e\u306b\u518d\u30d5\u30a7\u30c3\u30c1\u304c\u6b62\u307e\u3089\u306a\u3044\u300d\u3068\u3044\u3063\u305f\u565b\u307f\u5408\u308f\u306a\u3044\u5bfe\u51e6\u3092\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u6b62\u3081\u305f\u3044\u306e\u306f <code>staleTime<\/code> \u306e\u65b9\u3067\u3059\u3002<\/p>\n<h2>\u5bfe\u5fdc\u65b9\u6cd5<\/h2>\n<h3>1. <code>staleTime<\/code> \u3092\u8a2d\u5b9a\u3057\u3066\u7121\u99c4\u306a\u518d\u53d6\u5f97\u3092\u6b62\u3081\u308b<\/h3>\n<p>\u983b\u7e41\u306b\u5909\u308f\u3089\u306a\u3044\u30c7\u30fc\u30bf\uff08\u30de\u30b9\u30bf\u30c7\u30fc\u30bf\u3001\u30e6\u30fc\u30b6\u30fc\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u306a\u3069\uff09\u306f <code>staleTime<\/code> \u3092\u9577\u3081\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">const { data } = useQuery({\n  queryKey: [\"categories\"],\n  queryFn: fetchCategories,\n  staleTime: 1000 * 60 * 5, \/\/ 5\u5206\u9593\u306f fresh \u6271\u3044\uff1d\u518d\u53d6\u5f97\u3057\u306a\u3044\n});<\/pre>\n<p>\u3053\u308c\u30675\u5206\u4ee5\u5185\u306e\u30d5\u30a9\u30fc\u30ab\u30b9\u5fa9\u5e30\u3084\u518d\u30de\u30a6\u30f3\u30c8\u3067\u306f API \u3092\u53e9\u304b\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>2. \u5168\u4f53\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u3092\u5909\u3048\u308b<\/h3>\n<pre class=\"lang:default decode:true\">const queryClient = new QueryClient({\n  defaultOptions: {\n    queries: {\n      staleTime: 1000 * 60, \/\/ \u5168\u30af\u30a8\u30ea\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30921\u5206\u306b\n    },\n  },\n});<\/pre>\n<p>\u500b\u5225\u306e <code>useQuery<\/code> \u3067 <code>staleTime<\/code> \u3092\u6e21\u305b\u3070\u305d\u3061\u3089\u304c\u512a\u5148\u3055\u308c\u307e\u3059\u3002<\/p>\n<h3>3. \u518d\u53d6\u5f97\u30c8\u30ea\u30ac\u30fc\u3092\u500b\u5225\u306b\u5236\u5fa1\u3059\u308b<\/h3>\n<pre class=\"lang:default decode:true\">useQuery({\n  queryKey: [\"todos\"],\n  queryFn: fetchTodos,\n  refetchOnWindowFocus: false, \/\/ \u30d5\u30a9\u30fc\u30ab\u30b9\u5fa9\u5e30\u3067\u306e\u518d\u53d6\u5f97\u3092\u6b62\u3081\u308b\n  refetchOnMount: false,       \/\/ \u518d\u30de\u30a6\u30f3\u30c8\u6642\u306e\u518d\u53d6\u5f97\u3092\u6b62\u3081\u308b\n});<\/pre>\n<p>\u307e\u305a <code>staleTime<\/code> \u3067 fresh \u306e\u7bc4\u56f2\u3092\u6c7a\u3081\u3001\u305d\u308c\u3067\u3082\u8db3\u308a\u306a\u3044\u7d30\u304b\u3044\u6319\u52d5\u3092\u30c8\u30ea\u30ac\u30fc\u3067\u8abf\u6574\u3059\u308b\u3001\u3068\u3044\u3046\u9806\u3067\u8003\u3048\u308b\u3068\u6574\u7406\u3057\u3084\u3059\u3044\u3067\u3059\u3002<\/p>\n<h2>\u5b9f\u88c5\u4f8b\uff1a\u66f4\u65b0\u5f8c\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u7121\u52b9\u5316\u3059\u308b<\/h2>\n<p>\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\uff08mutation\uff09\u3057\u305f\u3042\u3068\u306f\u3001\u53e4\u3044\u30ad\u30e3\u30c3\u30b7\u30e5\u3092 stale \u306b\u3057\u3066\u53d6\u308a\u76f4\u3055\u305b\u307e\u3059\u3002<code>invalidateQueries<\/code> \u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">import { useMutation, useQueryClient } from \"@tanstack\/react-query\";\n\nfunction AddTodo() {\n  const queryClient = useQueryClient();\n\n  const mutation = useMutation({\n    mutationFn: (title: string) =&gt;\n      fetch(\"\/api\/todos\", {\n        method: \"POST\",\n        body: JSON.stringify({ title }),\n      }),\n    onSuccess: () =&gt; {\n      \/\/ [\"todos\"] \u3092 stale \u306b\u3057\u3066\u518d\u53d6\u5f97\u3055\u305b\u308b\n      queryClient.invalidateQueries({ queryKey: [\"todos\"] });\n    },\n  });\n\n  return (\n    &lt;button onClick={() =&gt; mutation.mutate(\"\u65b0\u3057\u3044\u30bf\u30b9\u30af\")}&gt;\n      \u8ffd\u52a0\n    &lt;\/button&gt;\n  );\n}<\/pre>\n<p><code>invalidateQueries<\/code> \u306f <code>staleTime<\/code> \u306e\u8a2d\u5b9a\u306b\u95a2\u308f\u3089\u305a\u3001\u5bfe\u8c61\u306e\u30af\u30a8\u30ea\u3092\u5f37\u5236\u7684\u306b stale \u306b\u3057\u3066\u518d\u30d5\u30a7\u30c3\u30c1\u3092\u4fc3\u3057\u307e\u3059\u3002\u300c\u66f4\u65b0\u3057\u305f\u306e\u306b\u4e00\u89a7\u304c\u53e4\u3044\u307e\u307e\u300d\u3092\u9632\u3050\u5b9a\u756a\u306e\u4f7f\u3044\u65b9\u3067\u3059\u3002<\/p>\n<h2>\u78ba\u8a8d\u65b9\u6cd5<\/h2>\n<p>\u6319\u52d5\u3092\u76ee\u3067\u78ba\u8a8d\u3059\u308b\u306b\u306f\u516c\u5f0f\u306e Devtools \u304c\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">import { ReactQueryDevtools } from \"@tanstack\/react-query-devtools\";\n\n\/\/ Provider \u306e\u4e2d\u306b\u7f6e\u304f\n&lt;ReactQueryDevtools initialIsOpen={false} \/&gt;<\/pre>\n<p>\u5404\u30af\u30a8\u30ea\u304c <code>fresh<\/code> \/ <code>stale<\/code> \/ <code>inactive<\/code> \u306e\u3069\u308c\u304b\u304c\u8272\u5206\u3051\u3067\u898b\u3048\u307e\u3059\u3002<code>staleTime<\/code> \u3092\u5909\u3048\u3066\u3001fresh \u3067\u3044\u308b\u6642\u9593\u304c\u3069\u3046\u5909\u308f\u308b\u304b\u3092\u78ba\u8a8d\u3059\u308b\u3068\u7406\u89e3\u304c\u65e9\u3044\u3067\u3059\u3002<\/p>\n<h2>\u6ce8\u610f\u70b9<\/h2>\n<ul>\n<li><code>staleTime: Infinity<\/code> \u306b\u3059\u308b\u3068\u81ea\u52d5\u3067\u306f\u4e8c\u5ea6\u3068\u53d6\u308a\u76f4\u3055\u306a\u304f\u306a\u308a\u307e\u3059\u3002\u624b\u52d5\u3067 <code>invalidateQueries<\/code> \u3092\u547c\u3076\u904b\u7528\u304c\u524d\u63d0\u306b\u306a\u308a\u307e\u3059\u3002<\/li>\n<li><code>staleTime<\/code> \u3092\u9577\u304f\u3057\u3059\u304e\u308b\u3068\u300c\u53e4\u3044\u30c7\u30fc\u30bf\u304c\u8868\u793a\u3055\u308c\u7d9a\u3051\u308b\u300d\u30ea\u30b9\u30af\u3068\u306e\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u306b\u306a\u308a\u307e\u3059\u3002\u30c7\u30fc\u30bf\u306e\u66f4\u65b0\u983b\u5ea6\u306b\u5408\u308f\u305b\u3066\u6c7a\u3081\u307e\u3059\u3002<\/li>\n<li>v5 \u3067 <code>cacheTime<\/code> \u306f <strong><code>gcTime<\/code><\/strong> \u306b\u6539\u540d\u3055\u308c\u307e\u3057\u305f\u3002\u53e4\u3044\u8a18\u4e8b\u306e\u30b3\u30fc\u30c9\u4f8b\u3067\u306f <code>cacheTime<\/code> \u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u8aad\u307f\u66ff\u3048\u304c\u5fc5\u8981\u3067\u3059\u3002<\/li>\n<li><code>staleTime<\/code> \u3068 <code>gcTime<\/code> \u306f\u72ec\u7acb\u3067\u3059\u3002<code>gcTime<\/code> \u3092\u4f38\u3070\u3057\u3066\u3082\u518d\u53d6\u5f97\u306f\u6b62\u307e\u308a\u307e\u305b\u3093\u3002\u6b62\u3081\u305f\u3044\u306e\u306f <code>staleTime<\/code> \u3067\u3059\u3002<\/li>\n<\/ul>\n<h2>\u307e\u3068\u3081<\/h2>\n<ul>\n<li><code>staleTime<\/code> = \u30c7\u30fc\u30bf\u304c fresh \u3067\u3044\u308b\u6642\u9593\uff08\uff1d\u3044\u3064\u53d6\u308a\u76f4\u3059\u304b\uff09<\/li>\n<li><code>gcTime<\/code> = \u672a\u4f7f\u7528\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6368\u3066\u308b\u307e\u3067\u306e\u6642\u9593\uff08\uff1d\u3044\u3064\u6368\u3066\u308b\u304b\uff09<\/li>\n<li>\u30c7\u30d5\u30a9\u30eb\u30c8\u306f <code>staleTime: 0<\/code> \u306a\u306e\u3067\u3001\u4f55\u3082\u3057\u306a\u3044\u3068\u518d\u53d6\u5f97\u304c\u983b\u767a\u3059\u308b<\/li>\n<li>\u5909\u308f\u308a\u306b\u304f\u3044\u30c7\u30fc\u30bf\u306f <code>staleTime<\/code> \u3092\u9577\u3081\u306b\u3001\u66f4\u65b0\u5f8c\u306f <code>invalidateQueries<\/code><\/li>\n<li>Devtools \u3067\u72b6\u614b\u9077\u79fb\u3092\u898b\u306a\u304c\u3089\u8abf\u6574\u3059\u308b\u306e\u304c\u4e00\u756a\u306e\u8fd1\u9053<\/li>\n<\/ul>\n<p>\u300c\u53d6\u3063\u305f\u3070\u304b\u308a\u306a\u306e\u306b\u518d\u30d5\u30a7\u30c3\u30c1\u3059\u308b\u300d\u306e\u7b54\u3048\u306f\u307b\u307c <code>staleTime: 0<\/code> \u3067\u3059\u3002\u3053\u3053\u3092\u7406\u89e3\u3059\u308b\u3068\u30ad\u30e3\u30c3\u30b7\u30e5\u6319\u52d5\u304c\u4e00\u6c17\u306b\u8aad\u3081\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>React \u3067\u30b5\u30fc\u30d0\u30fc\u306e\u72b6\u614b\uff08\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u53d6\u3063\u3066\u304f\u308b\u30c7\u30fc\u30bf\uff09\u3092\u6271\u3046\u3068\u304d\u3001useState \u3068 useEffect \u3067\u81ea\u524d\u5b9f\u88c5\u3059\u308b\u3068\u3001\u30ed\u30fc\u30c7\u30a3\u30f3\u30b0\u30fb\u30a8\u30e9\u30fc\u7ba1\u7406\u30fb\u518d\u53d6\u5f97\u30fb\u30ad\u30e3\u30c3\u30b7\u30e5\u30fb\u91cd\u8907\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u6392\u9664\u306a\u3069\u3092\u6bce\u56de\u66f8\u304f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002TanSta\u2026<\/p>\n","protected":false},"author":1,"featured_media":3620,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","_lightning_design_setting":[],"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[36],"tags":[64,1161,424,1162],"class_list":["post-3621","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript-memorandum","tag-api","tag-react","tag-424","tag-1162"],"veu_head_title_object":{"title":"","add_site_title":""},"jetpack_publicize_connections":[],"jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/qol-kk.com\/wp2\/wp-content\/uploads\/2026\/10\/20260914-00mu0ks1-thumbnail.jpg","_links":{"self":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/3621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/comments?post=3621"}],"version-history":[{"count":1,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/3621\/revisions"}],"predecessor-version":[{"id":3622,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/3621\/revisions\/3622"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media\/3620"}],"wp:attachment":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media?parent=3621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/categories?post=3621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/tags?post=3621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}