Skip to content

Conversation

kenjelly22
Copy link

Practiced using event handlers in React

Comment on lines +4 to +6
if (event.currentTarget === event.target) {
console.log("Good!")
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the conditional here:

Suggested change
if (event.currentTarget === event.target) {
console.log("Good!")
}
console.log("Good!")

Comment on lines +10 to +12
if (event.currentTarget === event.target) {
console.log("Hey! Eyes on me!")
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (event.currentTarget === event.target) {
console.log("Hey! Eyes on me!")
}
console.log("Hey! Eyes on me!")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants