content: /**
   * Created by melvynphillips on 15/04/2017.
   */
  
  
  import React from 'react';
  import TransitionGroup from 'react-transition-group/TransitionGroup';
  import {TweenMax} from "gsap";
  import Box2 from "./box2";
  
  
  
  
  
  
  export class Page extends React.Component {
  
  
      constructor () {
  
          super();
  
          this.state  = {shouldShowBox: true};
  
          this.toggleBox = this.toggleBox.bind(this);
  
  
      }
  
  
      // In order to use functions at 'this' level I need to bound them to this
      // use the constructor as in the above example so we can now do this.toggleBox
      toggleBox () {
          this.setState({
              shouldShowBox: !this.state.shouldShowBox
          });
      };
  
      render () {
  
          console.log(location);
          return <div className="page">
  
              <TransitionGroup>
              { this.state.shouldShowBox && <Box2/>}
              </TransitionGroup>
  
              <button
                  className="toggle-btn"
                  onClick={this.toggleBox}
              >
                  toggle
              </button>
          </div>;
      }
  }
  
  export default Page;