Touch Events Broken with ReactJS Upgrade in Chrome Mobile Emulator
<p>I recently upgraded from React 0.10 to React 0.14. Initially I was getting an error that <code>React.initializeTouchEvents</code> was not a function. I read some documentation which claimed that the need for this initialization was gone in the most recent version of React, so I did away with it. Now, however, no touch events are registering in my project. What do I need to do to get them to work again?</p>

<p>Below I have included some simple test code which I wrote to try out solutions to this problem. Currently no touch events are being registered at all.</p>

<p>My main js file:</p>

<pre><code>/** @jsx React.DOM */

var React = require('react');
var ReactDOM = require('react-dom');
var TestButton = require('components/common/testButton');

try {
  var lander = (&lt;TestButton/&gt;);
  ReactDOM.render(lander, document.getElementById('myContainer'));
}
catch (e) {
  error.errorHandler(e);
}
</code></pre>

<p>My TestButton component:</p>

<pre><code>/** @jsx React.DOM */

var React = require('react');

var TestButton = React.createClass ({
  getInitialState: function () {
    return {
      text: "Click Here!",
    };
  },
  toggle: function () {
    console.log('in toggle');
    if (this.state.text == "Click Here!"){
      this.setState({
        text: "Good Job!",
      });
    } else {
      this.setState({
        text: "Click Here!",
      });
    }
  },
  render: function () {
    return (
      &lt;div onTouchEnd={this.toggle}&gt;
          {this.state.text}
      &lt;/div&gt;
      );
  },
});
module.exports = TestButton;
</code></pre>

<p>Any insights would be greatly appreciated</p>

<p>EDIT: I tried changing to onTouchEnd since onTouchTap is no longer available. However, I still am having the same problem.</p>

<p>EDIT: this works fine from a mobile device itself. However, I can't get it to work from the Chrome mobile emulator</p>