Skip to content
Permalink
Browse files

feat: count up

  • Loading branch information...
atomita committed Oct 26, 2019
1 parent 71aafab commit 9efb497bd185f4b81f84ad7db4c5ca655b9f578a
Showing with 16 additions and 3 deletions.
  1. +16 −3 app/app.tsx
@@ -1,5 +1,18 @@
import * as React from 'react';
import React, { useState } from 'react';
import * as ReactDOM from 'react-dom';
//import Application from './Application';

ReactDOM.render(<div>application</div>, document.getElementById('app'))

function Application () {
const [cnt, setCnt] = useState(0)

return (
<div>
<div>
<button onClick={event => setCnt(cnt + 1)}>click</button>
</div>
count: {cnt}
</div>
)
}

ReactDOM.render(<Application />, document.getElementById('app'))

0 comments on commit 9efb497

Please sign in to comment.
You can’t perform that action at this time.