We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f8c4a8 commit a6b8087Copy full SHA for a6b8087
react-practice/src/Home.js
@@ -1,11 +1,22 @@
1
import React from 'react'
2
3
const Home = () => {
4
+
5
+ const handleClick = (e) => {
6
+ console.log('Hello world', e);
7
8
+ }
9
+ const handleClickAgain = (name, e) => {
10
+ console.log('Hello Again ' + name, e.target)
11
12
13
return (
14
<div className='home'>
15
<h2>Homepage</h2>
16
+ <button onClick={handleClick}>Click me</button>
17
+ <button onClick={(e)=> handleClickAgain('Filip', e)}>Click me again</button>
18
</div>
19
)
20
}
21
-export default Home
22
+export default Home
react-practice/src/Navbar.js
@@ -7,6 +7,7 @@ const Navbar = () => {
<div className='links'>
<a href='/'>Home</a>
<a href='/create'>New Blog</a>
</nav>
0 commit comments