<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>portaltan</author_name>
  <author_url>https://blog.hatena.ne.jp/portaltan/</author_url>
  <blog_title>脳汁portal</blog_title>
  <blog_url>https://portaltan.hatenablog.com/</blog_url>
  <categories>
    <anon>JavaScript</anon>
    <anon>React</anon>
  </categories>
  <description>ReactでEnter keyが押されたときにアクションを設定する方法です。 ソースコード var Test = React.createClass( { sendCommand(e) { # &lt;== ① var ENTER = 13; # &lt;== ② if (e.keyCode == ENTER) { # &lt;== ③ // Enterが押されたときのアクション } }, render: function() { return ( &lt;input onKeyDown={this.sendCommand} /&gt; # &lt;== ④ ); } } ); React.render(&lt;Test /&gt;, do…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fportaltan.hatenablog.com%2Fentry%2F2015%2F08%2F07%2F173942&quot; title=&quot;ReactでEnterキーのpushイベントを取得する方法 - 脳汁portal&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>2015-08-07 17:39:42</published>
  <title>ReactでEnterキーのpushイベントを取得する方法</title>
  <type>rich</type>
  <url>https://portaltan.hatenablog.com/entry/2015/08/07/173942</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
