Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. class MyReactComponent extends Component {
  2. constructor(props) {
  3. super(props);
  4. this.myTestFunction = this.myTestFunction.bind(this);
  5. }
  6. myTestFunction(){
  7. alert("hello")
  8. }
  9. render() {
  10. return (
  11. <Page title="My Page"
  12. primaryAction={{
  13. content: 'Do Something',
  14. onAction: this.myTestFunction
  15. }}
  16. />
  17. )
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement