Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 528 Bytes

events.md

File metadata and controls

25 lines (19 loc) · 528 Bytes

Events

The JSXComponent includes basic events to handle you can read the supported events

Usage

import JSXComponent from 'jsx-render/lib/JSXComponent'

class Component extends JSXComponent {
  click() {
    clickLog = true
  }

  render(props) {
    return (
      <button id="clickable" ref={super.ref} onClick={this.click}>
        click me!
      </button>
    )
  }
}

Use the ref prop to pass super.ref that alone let you use onClick and pass any function you want.