Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
Terry-Su committed Jun 24, 2021
1 parent 85e377a commit edd10b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion react-16.13.1/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
function App() {
return <div>Hello, React Source Code!</div>
const [count, setCount] = React.useState(0)
return <div>
<div>Hello, React Source Code!</div>
<div>Number: {count}</div>
<button onClick={() => setCount(v => v + 1)}>Increment</button>
</div>
}

ReactDOM.render(<App/>, document.querySelector('#app'))

0 comments on commit edd10b4

Please sign in to comment.