jsx code
1234567890101234567890201234567890301234567890401234567890501234567890601234567890701234567890801234567890901234567890100123
- class MyComponent extends migi.Component {
- constructor(data) {
- super(data);
- this.index = 0;
- }
- @bind index
- handleClick() {
- this.index++;
- }
- render() {
- return (
- <div>
- <p onClick={ this.handleClick }>click</p>
- <p><span>{ this.index }</span>{ this.index } { this.index }<strong>{ this.index }</strong></p>
- </div>
- );
- }
- }
-
- migi.render(
- <MyComponent />,
- '#example'
- );