App.tsx 616 Bytes
Newer Older
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { count } from '@gringlobal/counter/counter';

class App extends React.Component<any> {

  public state = {
    current: 0,
  };

  public render(): React.ReactNode {
    return (
      <div>
        <img src="images/mock_img.svg" alt="mockImage" width="100px"/>
        <div>current: { this.state.current }</div>
        <button onClick={ () => this.setState({ current: count(this.state.current) }) }>Increment </button>
      </div>
    );
  }
}


ReactDOM.render(
  <App/>,
  document.getElementById('the-app'),
)

export default App;