import React from 'react';
import Modal from './Modal.js';
import css from './App.css';


const App = React.createClass({
  getInitialState() {
    return {
      showModal: false,
      showLazyModal: false
    };
  },


  showModal() {
    this.setState({showModal: true});
  },


  hideModal() {
    this.setState({showModal: false});
  },


  showLazyModal() {
    this.setState({showLazyModal: true});
  },


  hideLazyModal() {
    this.setState({showLazyModal: false});
  },

  render() {
    const {showModal, showLazyModal} = this.state;

    return (
      <div className={css.app}>
        <h1>react-page-click</h1>

        <button onClick={this.showModal}>
          Open Modal
        </button>
        &nbsp;Closes on mouse down or touch start events

        <br />

        <button onClick={this.showLazyModal}>
          Open Lazy Model
        </button>
        &nbsp;Closes on mouse down or touch end events

        {showModal ? (
          <Modal onClose={this.hideModal}>
            Modal content
          </Modal>
        ) : null}

        {showLazyModal ? (
          <Modal onClose={this.hideLazyModal} notifyOnTouchEnd>
            Lazy Modal content
          </Modal>
        ) : null}
      </div>
    );
  }
});
export default App;

@@ -86,73 +86,101 @@
 ';%0A%0A
-%0Aconst App = React.createClass(%7B%0A  getInitialState() %7B%0A    return
+class App extends React.Component %7B%0A  constructor(props) %7B%0A    super(props);%0A    this.state =
  %7B%0A 
@@ -234,25 +234,23 @@
 se%0A    %7D
-;
 %0A  %7D,%0A%0A
-%0A
   showMo

Replace deprecated code