<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>K_Koh</author_name>
  <author_url>https://blog.hatena.ne.jp/K_Koh/</author_url>
  <blog_title>Just do IT</blog_title>
  <blog_url>https://k-koh.hatenablog.com/</blog_url>
  <categories>
    <anon>JavaScript</anon>
  </categories>
  <description>「デフォルトのエクスポートをインポートする場合、{}は必要ない」ということを学んだのでメモしておきます。 export defaultで定義されている関数を読み込む場合 export default functionで定義された関数をimportするとき、{}は必要ない。 hello.js export default function hello (msg) { document.body.innerHTML = msg console.log(msg) } index.js import hello from './hello'; デフォルトで定義された関数は{}をつけなくてもいい。 {}…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fk-koh.hatenablog.com%2Fentry%2F2020%2F07%2F07%2F112642&quot; title=&quot;ES6 デフォルトで定義された関数をインポートするときは {} をつけなくてもいい - Just do IT&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>2020-07-07 11:26:42</published>
  <title>ES6 デフォルトで定義された関数をインポートするときは {} をつけなくてもいい</title>
  <type>rich</type>
  <url>https://k-koh.hatenablog.com/entry/2020/07/07/112642</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
