Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 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 29 30 31 32 33 34 35 36 | 2x 2x 1x 2x | import logo from './logo.svg';
import './App.css';
import { useState } from 'react';
function App() {
let [count, setCount] = useState(0);
const clickOnMe = () => {
setCount(count + 1);
}
return (
<div className="App">
{/* <header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header> */}
<button onClick={clickOnMe}>Click me</button>
<span data-testid="count">{count}</span>
</div>
);
}
export default App;
|