<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kikiki-kiki</author_name>
  <author_url>https://blog.hatena.ne.jp/kikiki-kiki/</author_url>
  <blog_title>かもメモ</blog_title>
  <blog_url>https://chaika.hatenablog.com/</blog_url>
  <categories>
    <anon>TypeScript</anon>
    <anon>React</anon>
    <anon>JavaScript</anon>
  </categories>
  <description>React の useState で返される state の型を指定したい useState&lt;型&gt;(initial value) で state に型を強制できる type IdolType = 'cute' | 'cool' | 'pop' | 'sexy'; const [type, setType] = useState&lt;IdolType&gt;('cute'); setType('foo'); // =&gt; Argument of type '&quot;foo&quot;' is not assignable to parameter of type 'SetStateAction&lt;IdolType&gt;' set…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchaika.hatenablog.com%2Fentry%2F2020%2F08%2F16%2F083000&quot; title=&quot;React TypeScript useState に型を設定したい - かもメモ&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>https://m.media-amazon.com/images/I/41TW3EHwQPL._SL160_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-08-16 08:30:00</published>
  <title>React TypeScript useState に型を設定したい</title>
  <type>rich</type>
  <url>https://chaika.hatenablog.com/entry/2020/08/16/083000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
