]> Untitled Git - lemmy-ui.git/blob - src/client/components/About/About.tsx
Initial commit.
[lemmy-ui.git] / src / client / components / About / About.tsx
1 import { Component } from "inferno";\r
2 import "./About.css";\r
3 interface IState {\r
4    clickCount: number;\r
5 }\r
6 interface IProps {}\r
7 export default class About extends Component<IProps, IState> {\r
8    constructor(props) {\r
9       super(props);\r
10       this.state = {\r
11          clickCount: 0\r
12       };\r
13       this.increment = this.increment.bind(this);\r
14    }\r
15    protected increment() {\r
16       this.setState({\r
17          clickCount: this.state.clickCount + 1\r
18       });\r
19    }\r
20    public render() {\r
21       return (\r
22          <div>\r
23             Simple Inferno SSR template\r
24             <p className="text">Hello, world!</p>\r
25             <button onClick={this.increment} className="button">\r
26                Increment\r
27             </button>\r
28             <p className="count">{this.state.clickCount}</p>\r
29          </div>\r
30       );\r
31    }\r
32 }\r