Skip to content

Commit

Permalink
lesson-7
Browse files Browse the repository at this point in the history
  • Loading branch information
iamshaunjp committed Dec 13, 2020
1 parent d2e210f commit f5e6478
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dojo-blog/.eslintcache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\index.js":"1","C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\App.js":"2","C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\Navbar.js":"3","C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\Home.js":"4"},{"size":432,"mtime":1607775534246,"results":"5","hashOfConfig":"6"},{"size":231,"mtime":1607876502242,"results":"7","hashOfConfig":"6"},{"size":378,"mtime":1607876760570,"results":"8","hashOfConfig":"6"},{"size":131,"mtime":1607783090089,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"12"},"13wetv0",{"filePath":"13","messages":"14","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"15","messages":"16","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"17","messages":"18","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"12"},"C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\index.js",[],["19","20"],"C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\App.js",[],"C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\Navbar.js",[],"C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\Home.js",[],{"ruleId":"21","replacedBy":"22"},{"ruleId":"23","replacedBy":"24"},"no-native-reassign",["25"],"no-negated-in-lhs",["26"],"no-global-assign","no-unsafe-negation"]
[{"C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\index.js":"1","C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\App.js":"2","C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\Navbar.js":"3","C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\Home.js":"4"},{"size":432,"mtime":1607775534246,"results":"5","hashOfConfig":"6"},{"size":231,"mtime":1607876502242,"results":"7","hashOfConfig":"6"},{"size":378,"mtime":1607876760570,"results":"8","hashOfConfig":"6"},{"size":446,"mtime":1607877184584,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"12"},"13wetv0",{"filePath":"13","messages":"14","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"15","messages":"16","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"17","messages":"18","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\index.js",[],["19","20"],"C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\App.js",[],"C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\Navbar.js",[],"C:\\Users\\Shaun\\Documents\\Tuts\\YouTube\\course-files\\Complete-React-Tutorial\\dojo-blog\\src\\Home.js",[],{"ruleId":"21","replacedBy":"22"},{"ruleId":"23","replacedBy":"24"},"no-native-reassign",["25"],"no-negated-in-lhs",["26"],"no-global-assign","no-unsafe-negation"]
13 changes: 12 additions & 1 deletion dojo-blog/src/Home.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
const Home = () => {

const handleClick = (e) => {
console.log('hello ninjas', e);
}

const handleClickAgain = (name, e) => {
console.log('hello ' + name, e.target);
}

return (
<div className="home">
<h2>Homepage</h2>
<button onClick={handleClick}>Click me</button>
<button onClick={(e) => handleClickAgain('mario', e)}>Click me again</button>
</div>
);
}

export default Home;
export default Home;

1 comment on commit f5e6478

@timmcwilliams
Copy link

Choose a reason for hiding this comment

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

Console is giving the following error.

"Uncaught (in promise) Error: The message port closed before a response was received."

Please sign in to comment.