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 0fe0ad5 commit ea24d64
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion react-17.0.2/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 ea24d64

Please sign in to comment.