<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>matsutoba</author_name>
  <author_url>https://blog.hatena.ne.jp/matsutoba/</author_url>
  <blog_title>matsutoba’s blog</blog_title>
  <blog_url>https://matsutoba.hateblo.jp/</blog_url>
  <categories>
    <anon>React</anon>
  </categories>
  <description>いつも忘れるReactのメモ化関連のメモ。 定数値はコンポーネントの外に出す コンポーネント内のオブジェクトは毎回インスタンス生成されてしまうので、コンポーネントの外に出す。 // 普通に書いたとき const ButtonElement = () =&gt; { const foo = ['a', 'b']; }// 定数はコンポーネントの外に出す const foo = ['a', 'b']; const ButtonElement = React.memo(() =&gt; { }) propsが変わらない限り描画内容が変化しないコンポーネントはメモ化する propsに依存しない固定表示のコンポーネ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmatsutoba.hateblo.jp%2Fentry%2F2023%2F02%2F10%2F144605&quot; title=&quot;Reactのメモ化の覚書 - matsutoba’s blog&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-10 14:46:05</published>
  <title>Reactのメモ化の覚書</title>
  <type>rich</type>
  <url>https://matsutoba.hateblo.jp/entry/2023/02/10/144605</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
