<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>memorude</author_name>
  <author_url>https://blog.hatena.ne.jp/memorude/</author_url>
  <blog_title>PUROGU LADESU</blog_title>
  <blog_url>https://puroguradesu.hatenadiary.jp/</blog_url>
  <categories>
    <anon>React</anon>
  </categories>
  <description>フック 関数コンポーネントに機能を追加するための仕組み 副作用フック コンポーネントを描画、破棄するタイミングで何らかの処理を実行させる フックは必ず関数コンポーネントのトップレベルで呼び出すこと。 ループ、条件分岐、入れ子関数では機能しません。 useEffect 初期描画時、再描画時（変数更新時） useEffectの中で値を更新すると再描画されるので無限ループになってしまうので注意 const t = setInterval(() =&gt; { // タイマー設定時のcountを保持してしまい動かない // setCount(count + 1); setCount((c) =&gt; c + 1…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpuroguradesu.hatenadiary.jp%2Fentry%2F2023%2F02%2F25%2F021714&quot; title=&quot;React フック - PUROGU LADESU&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-02-25 02:17:14</published>
  <title>React フック</title>
  <type>rich</type>
  <url>https://puroguradesu.hatenadiary.jp/entry/2023/02/25/021714</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
