egojump / notes

4 stars 0 forks source link

A new view layer library #6

Open egoist opened 6 years ago

egoist commented 6 years ago
import { Component } from 'aho'
import { render } from 'aho-dom'

class Counter extends Component {
  state = {
    count: this.props.initialCount
  }

  render() {
    return (
      <button onClick={() => this.state.count++}>
        {this.state.count}
      </button>
    )
  }
}

render(<Counter initialCount={0} />, document.getElementById('root'))