SHARE
TWEET

Untitled

a guest Sep 16th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import app from '@SE/Core/App';
  3. import Controller from '@SE/Core/Page/Controller';
  4. import Button from '@SE/Core/Button';
  5.  
  6. export default class Component extends React.Component {
  7.     static propTypes = {};
  8.  
  9.     constructor (props) {
  10.         super(props);
  11.  
  12.         app.withEach('handleClick').bind(this);
  13.     }
  14.  
  15.     componentDidCatch (error, info) {
  16.         app.withException(error, info);
  17.     }
  18.  
  19.     handleClick () {
  20.         app.dispatch(this, 'EventName', {
  21.             hello: 'world'
  22.         });
  23.     }
  24.  
  25.     render () {
  26.         return (
  27.             <Controller route="Acme:HelloWorld:home" title="Hello World!">
  28.                 <Button onClick={this.handleClick}>Click Me</Button>
  29.             </Controller>
  30.         );
  31.     }
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top