<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hitonatsu</author_name>
  <author_url>https://blog.hatena.ne.jp/hitonatsu/</author_url>
  <blog_title>ひと夏の技術</blog_title>
  <blog_url>https://tech-1natsu.hatenablog.com/</blog_url>
  <categories>
    <anon>トラブルシューティング</anon>
  </categories>
  <description>まだalphaリリース(v16.7.0-alpha)のHooksを使っていたらハマった。 『Hooks can only be called inside the body of a function component.』とエラーバウンダリーの画面で怒られてしまう。 状況 親プロジェクトでHooksを用いたライブラリコンポーネントを作成している 作っているライブラリコンポーネントを子プロジェクトにlinkして子プロジェクト内で試用しようとした 怒られる。 ディレクトリ図はこういう感じで、ライブラリ開発現場(親)の中にexample(子)ディレクトリがあって、子は子で別途package.jso…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech-1natsu.hatenablog.com%2Fentry%2F2019%2F01%2F10%2F193043&quot; title=&quot;React Hooks使って『Hooks can only be called inside the body of a function component.』って怒られる問題 - ひと夏の技術&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>2019-01-10 19:30:43</published>
  <title>React Hooks使って『Hooks can only be called inside the body of a function component.』って怒られる問題</title>
  <type>rich</type>
  <url>https://tech-1natsu.hatenablog.com/entry/2019/01/10/193043</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
