From f47a7526d315c577d45b59b37180280ec7a8c1ac Mon Sep 17 00:00:00 2001 From: Masatoshi Date: Fri, 22 Jan 2021 22:37:59 +0900 Subject: [PATCH 01/11] props_tutorial_learned --- .eslintcache | 2 +- src/App.js | 10 ++++++++-- src/components/Greet.js | 7 ++++--- src/components/Welcome.js | 11 ++++------- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.eslintcache b/.eslintcache index 03555f0..8ac3c92 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5"},{"size":500,"mtime":1611136676035,"results":"6","hashOfConfig":"7"},{"size":320,"mtime":1611236828564,"results":"8","hashOfConfig":"7"},{"size":362,"mtime":1611136676036,"results":"9","hashOfConfig":"7"},{"size":108,"mtime":1611235745555,"results":"10","hashOfConfig":"7"},{"size":178,"mtime":1611236840054,"results":"11","hashOfConfig":"7"},{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"15abmaf",{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],"/Users/ogiwaramasatoshi/untitled1/src/App.js",[],"/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[]] \ No newline at end of file +[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5"},{"size":500,"mtime":1611136676035,"results":"6","hashOfConfig":"7"},{"size":516,"mtime":1611322489391,"results":"8","hashOfConfig":"7"},{"size":362,"mtime":1611136676036,"results":"9","hashOfConfig":"7"},{"size":164,"mtime":1611322453240,"results":"10","hashOfConfig":"7"},{"size":154,"mtime":1611322453234,"results":"11","hashOfConfig":"7"},{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"15abmaf",{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],"/Users/ogiwaramasatoshi/untitled1/src/App.js",[],"/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],["23","24"],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],{"ruleId":"25","replacedBy":"26"},{"ruleId":"27","replacedBy":"28"},"no-native-reassign",["29"],"no-negated-in-lhs",["30"],"no-global-assign","no-unsafe-negation"] \ No newline at end of file diff --git a/src/App.js b/src/App.js index a76bdfc..b7f3cc3 100644 --- a/src/App.js +++ b/src/App.js @@ -7,8 +7,14 @@ class App extends Component{ render() { return(
- - + + + + + + + +
); } diff --git a/src/components/Greet.js b/src/components/Greet.js index 131c098..6b60066 100644 --- a/src/components/Greet.js +++ b/src/components/Greet.js @@ -1,7 +1,8 @@ import React from 'react' -function Greet() { - return

Hello World !

-} +const Greet = (props) => { + console.log(props) + return

Bonjour {props.name} to {props.hero}

+ } export default Greet; \ No newline at end of file diff --git a/src/components/Welcome.js b/src/components/Welcome.js index af47269..ff7e758 100644 --- a/src/components/Welcome.js +++ b/src/components/Welcome.js @@ -1,11 +1,8 @@ -import React, { Component } from 'react' +import React from 'react' -class Welcome extends Component{ - render() { - return( -

Class Component

- ) - } +const Welcome = (props) => { + console.log(props) + return

Welcome to Japan {props.name}

} export default Welcome; \ No newline at end of file From bb05dd13a636b9aaf01c373e20c905c892f7410b Mon Sep 17 00:00:00 2001 From: Masatoshi Date: Tue, 26 Jan 2021 00:57:08 +0900 Subject: [PATCH 02/11] this.state.this.setState_learned --- .eslintcache | 2 +- src/App.js | 18 +++++++++++------- src/components/Message.js | 28 ++++++++++++++++++++++++++++ src/components/Welcome.js | 12 ++++++++---- 4 files changed, 48 insertions(+), 12 deletions(-) create mode 100644 src/components/Message.js diff --git a/.eslintcache b/.eslintcache index 8ac3c92..a40636a 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5"},{"size":500,"mtime":1611136676035,"results":"6","hashOfConfig":"7"},{"size":516,"mtime":1611322489391,"results":"8","hashOfConfig":"7"},{"size":362,"mtime":1611136676036,"results":"9","hashOfConfig":"7"},{"size":164,"mtime":1611322453240,"results":"10","hashOfConfig":"7"},{"size":154,"mtime":1611322453234,"results":"11","hashOfConfig":"7"},{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"15abmaf",{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],"/Users/ogiwaramasatoshi/untitled1/src/App.js",[],"/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],["23","24"],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],{"ruleId":"25","replacedBy":"26"},{"ruleId":"27","replacedBy":"28"},"no-native-reassign",["29"],"no-negated-in-lhs",["30"],"no-global-assign","no-unsafe-negation"] \ No newline at end of file +[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5","/Users/ogiwaramasatoshi/untitled1/src/components/Message.js":"6"},{"size":500,"mtime":1611136676035,"results":"7","hashOfConfig":"8"},{"size":678,"mtime":1611582138470,"results":"9","hashOfConfig":"8"},{"size":362,"mtime":1611136676036,"results":"10","hashOfConfig":"8"},{"size":164,"mtime":1611322453240,"results":"11","hashOfConfig":"8"},{"size":205,"mtime":1611323259102,"results":"12","hashOfConfig":"8"},{"size":510,"mtime":1611590166780,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},"15abmaf",{"filePath":"17","messages":"18","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"19","messages":"20","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],["27","28"],"/Users/ogiwaramasatoshi/untitled1/src/App.js",[],"/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Message.js",[],{"ruleId":"29","replacedBy":"30"},{"ruleId":"31","replacedBy":"32"},"no-native-reassign",["33"],"no-negated-in-lhs",["34"],"no-global-assign","no-unsafe-negation"] \ No newline at end of file diff --git a/src/App.js b/src/App.js index b7f3cc3..07b01a2 100644 --- a/src/App.js +++ b/src/App.js @@ -1,20 +1,24 @@ import React, { Component } from 'react' import './App.css' +// eslint-disable-next-line import Greet from './components/Greet' +// eslint-disable-next-line import Welcome from "./components/Welcome"; +import Message from "./components/Message"; class App extends Component{ render() { return(
- - - - - + + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} - - + {/**/} + {/**/}
); } diff --git a/src/components/Message.js b/src/components/Message.js new file mode 100644 index 0000000..6c76644 --- /dev/null +++ b/src/components/Message.js @@ -0,0 +1,28 @@ +import React, { Component } from 'react' + + +class Message extends Component { + constructor() { + super() + this.state= { + message: 'Welcome haha!' + } + } + + changeMessage() { + this.setState({ + message: 'Thank you!' + }) + } + + render() { + return( +
+

{ this.state.message}

+ +
+ ) + } +} + +export default Message; \ No newline at end of file diff --git a/src/components/Welcome.js b/src/components/Welcome.js index ff7e758..f9f8aa1 100644 --- a/src/components/Welcome.js +++ b/src/components/Welcome.js @@ -1,8 +1,12 @@ -import React from 'react' +import React, { Component } from 'react' -const Welcome = (props) => { - console.log(props) - return

Welcome to Japan {props.name}

+ +class Welcome extends Component { + render(){ + return( +

Welcome {this.props.name} to {this.props.name}

+ ) + } } export default Welcome; \ No newline at end of file From d24fa5329d1a6d3e8ee5cd8cde91daa7b347e1c6 Mon Sep 17 00:00:00 2001 From: Masatoshi Date: Tue, 26 Jan 2021 22:37:10 +0900 Subject: [PATCH 03/11] buttonHandler_learned --- .eslintcache | 2 +- src/App.js | 8 +++++++- src/components/ClassClick.js | 16 ++++++++++++++++ src/components/Function.js | 14 ++++++++++++++ 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 src/components/ClassClick.js create mode 100644 src/components/Function.js diff --git a/.eslintcache b/.eslintcache index a40636a..b6d5d99 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5","/Users/ogiwaramasatoshi/untitled1/src/components/Message.js":"6"},{"size":500,"mtime":1611136676035,"results":"7","hashOfConfig":"8"},{"size":678,"mtime":1611582138470,"results":"9","hashOfConfig":"8"},{"size":362,"mtime":1611136676036,"results":"10","hashOfConfig":"8"},{"size":164,"mtime":1611322453240,"results":"11","hashOfConfig":"8"},{"size":205,"mtime":1611323259102,"results":"12","hashOfConfig":"8"},{"size":510,"mtime":1611590166780,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},"15abmaf",{"filePath":"17","messages":"18","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"19","messages":"20","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],["27","28"],"/Users/ogiwaramasatoshi/untitled1/src/App.js",[],"/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Message.js",[],{"ruleId":"29","replacedBy":"30"},{"ruleId":"31","replacedBy":"32"},"no-native-reassign",["33"],"no-negated-in-lhs",["34"],"no-global-assign","no-unsafe-negation"] \ No newline at end of file +[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5","/Users/ogiwaramasatoshi/untitled1/src/components/Message.js":"6","/Users/ogiwaramasatoshi/untitled1/src/components/Function.js":"7","/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js":"8"},{"size":500,"mtime":1611136676035,"results":"9","hashOfConfig":"10"},{"size":855,"mtime":1611667793329,"results":"11","hashOfConfig":"10"},{"size":362,"mtime":1611136676036,"results":"12","hashOfConfig":"10"},{"size":164,"mtime":1611322453240,"results":"13","hashOfConfig":"10"},{"size":205,"mtime":1611323259102,"results":"14","hashOfConfig":"10"},{"size":510,"mtime":1611590166780,"results":"15","hashOfConfig":"10"},{"size":247,"mtime":1611666895505,"results":"16","hashOfConfig":"10"},{"size":321,"mtime":1611668020758,"results":"17","hashOfConfig":"10"},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},"15abmaf",{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],["35","36"],"/Users/ogiwaramasatoshi/untitled1/src/App.js",[],"/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Message.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Function.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js",[],{"ruleId":"37","replacedBy":"38"},{"ruleId":"39","replacedBy":"40"},"no-native-reassign",["41"],"no-negated-in-lhs",["42"],"no-global-assign","no-unsafe-negation"] \ No newline at end of file diff --git a/src/App.js b/src/App.js index 07b01a2..e4a3e3e 100644 --- a/src/App.js +++ b/src/App.js @@ -4,13 +4,19 @@ import './App.css' import Greet from './components/Greet' // eslint-disable-next-line import Welcome from "./components/Welcome"; +// eslint-disable-next-line import Message from "./components/Message"; +import Function from "./components/Function"; +import ClassClick from "./components/ClassClick"; + class App extends Component{ render() { return(
- + + + {/**/} {/* */} {/* */} {/* */} diff --git a/src/components/ClassClick.js b/src/components/ClassClick.js new file mode 100644 index 0000000..58d26db --- /dev/null +++ b/src/components/ClassClick.js @@ -0,0 +1,16 @@ +import React, { Component } from 'react' + +export class ClassClick extends Component { + clickHandler() { + console.log('fuck you') + } + render() { + return( +
+ +
+ ) + } +} + +export default ClassClick; \ No newline at end of file diff --git a/src/components/Function.js b/src/components/Function.js new file mode 100644 index 0000000..7653178 --- /dev/null +++ b/src/components/Function.js @@ -0,0 +1,14 @@ +import React from 'react' + +function Function() { + function clickHandler() { + console.log('Push') + } + return( +
+ +
+ ) +} + +export default Function; \ No newline at end of file From 0352cf101c9d2c370ac08727935a59ebcda44c90 Mon Sep 17 00:00:00 2001 From: Masatoshi Date: Wed, 27 Jan 2021 22:44:49 +0900 Subject: [PATCH 04/11] BindingHandler_learned --- .eslintcache | 2 +- src/App.js | 7 ++++-- src/components/BindingHandler.js | 42 ++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 src/components/BindingHandler.js diff --git a/.eslintcache b/.eslintcache index b6d5d99..7881f52 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5","/Users/ogiwaramasatoshi/untitled1/src/components/Message.js":"6","/Users/ogiwaramasatoshi/untitled1/src/components/Function.js":"7","/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js":"8"},{"size":500,"mtime":1611136676035,"results":"9","hashOfConfig":"10"},{"size":855,"mtime":1611667793329,"results":"11","hashOfConfig":"10"},{"size":362,"mtime":1611136676036,"results":"12","hashOfConfig":"10"},{"size":164,"mtime":1611322453240,"results":"13","hashOfConfig":"10"},{"size":205,"mtime":1611323259102,"results":"14","hashOfConfig":"10"},{"size":510,"mtime":1611590166780,"results":"15","hashOfConfig":"10"},{"size":247,"mtime":1611666895505,"results":"16","hashOfConfig":"10"},{"size":321,"mtime":1611668020758,"results":"17","hashOfConfig":"10"},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},"15abmaf",{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],["35","36"],"/Users/ogiwaramasatoshi/untitled1/src/App.js",[],"/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Message.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Function.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js",[],{"ruleId":"37","replacedBy":"38"},{"ruleId":"39","replacedBy":"40"},"no-native-reassign",["41"],"no-negated-in-lhs",["42"],"no-global-assign","no-unsafe-negation"] \ No newline at end of file +[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5","/Users/ogiwaramasatoshi/untitled1/src/components/Message.js":"6","/Users/ogiwaramasatoshi/untitled1/src/components/Function.js":"7","/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js":"8","/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js":"9"},{"size":500,"mtime":1611136676035,"results":"10","hashOfConfig":"11"},{"size":955,"mtime":1611669019325,"results":"12","hashOfConfig":"11"},{"size":362,"mtime":1611136676036,"results":"13","hashOfConfig":"11"},{"size":164,"mtime":1611322453240,"results":"14","hashOfConfig":"11"},{"size":205,"mtime":1611323259102,"results":"15","hashOfConfig":"11"},{"size":510,"mtime":1611590166780,"results":"16","hashOfConfig":"11"},{"size":247,"mtime":1611666895505,"results":"17","hashOfConfig":"11"},{"size":321,"mtime":1611668020758,"results":"18","hashOfConfig":"11"},{"size":859,"mtime":1611754865555,"results":"19","hashOfConfig":"11"},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},"15abmaf",{"filePath":"23","messages":"24","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"25","usedDeprecatedRules":"22"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],["40","41"],"/Users/ogiwaramasatoshi/untitled1/src/App.js",["42","43"],"import React, { Component } from 'react'\nimport './App.css'\n// eslint-disable-next-line\nimport Greet from './components/Greet'\n// eslint-disable-next-line\nimport Welcome from \"./components/Welcome\";\n// eslint-disable-next-line\nimport Message from \"./components/Message\";\nimport Function from \"./components/Function\";\nimport ClassClick from \"./components/ClassClick\";\nimport BindingHandler from \"./components/BindingHandler\"\n\n\n\nclass App extends Component{\n render() {\n return(\n
\n \n {/**/}\n {/**/}\n {/**/}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n\n {/**/}\n {/**/}\n
\n );\n }\n}\n\nexport default App;","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Message.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Function.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js",[],{"ruleId":"44","replacedBy":"45"},{"ruleId":"46","replacedBy":"47"},{"ruleId":"48","severity":1,"message":"49","line":9,"column":8,"nodeType":"50","messageId":"51","endLine":9,"endColumn":16},{"ruleId":"48","severity":1,"message":"52","line":10,"column":8,"nodeType":"50","messageId":"51","endLine":10,"endColumn":18},"no-native-reassign",["53"],"no-negated-in-lhs",["54"],"no-unused-vars","'Function' is defined but never used.","Identifier","unusedVar","'ClassClick' is defined but never used.","no-global-assign","no-unsafe-negation"] \ No newline at end of file diff --git a/src/App.js b/src/App.js index e4a3e3e..5fb74f3 100644 --- a/src/App.js +++ b/src/App.js @@ -8,14 +8,17 @@ import Welcome from "./components/Welcome"; import Message from "./components/Message"; import Function from "./components/Function"; import ClassClick from "./components/ClassClick"; +import BindingHandler from "./components/BindingHandler" + class App extends Component{ render() { return(
- - + + {/**/} + {/**/} {/**/} {/* */} {/* */} diff --git a/src/components/BindingHandler.js b/src/components/BindingHandler.js new file mode 100644 index 0000000..cffcc7a --- /dev/null +++ b/src/components/BindingHandler.js @@ -0,0 +1,42 @@ +import React, { Component } from 'react' + +export class BindingHandler extends Component{ + constructor(props) { + super(props) + + this.state={ + message: 'shut fuck up !' + } + // + // #1 + // this.clickHandler= this.clickHandler.bind(this) + } + // + // #2 + // + // clickHandler() { + // this.setState({ + // message: 'Joe Cola' + // }) + // console.log(this) + // } + + // #3 + clickHandler = () => { + this.setState({ + message: 'fuck off!' + }) + } + + render() { + return( +
+
{this.state.message}
+ {/**/} + +
+ ) + } +} + +export default BindingHandler ; \ No newline at end of file From 19ca05848b8a2ceac77427789cfaae6e2099f25c Mon Sep 17 00:00:00 2001 From: Masatoshi Date: Thu, 28 Jan 2021 22:10:29 +0900 Subject: [PATCH 05/11] props_method_learned --- .eslintcache | 2 +- src/App.js | 8 +++++--- src/components/Children.js | 11 +++++++++++ src/components/Parent.js | 29 +++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 src/components/Children.js create mode 100644 src/components/Parent.js diff --git a/.eslintcache b/.eslintcache index 7881f52..fd08760 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5","/Users/ogiwaramasatoshi/untitled1/src/components/Message.js":"6","/Users/ogiwaramasatoshi/untitled1/src/components/Function.js":"7","/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js":"8","/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js":"9"},{"size":500,"mtime":1611136676035,"results":"10","hashOfConfig":"11"},{"size":955,"mtime":1611669019325,"results":"12","hashOfConfig":"11"},{"size":362,"mtime":1611136676036,"results":"13","hashOfConfig":"11"},{"size":164,"mtime":1611322453240,"results":"14","hashOfConfig":"11"},{"size":205,"mtime":1611323259102,"results":"15","hashOfConfig":"11"},{"size":510,"mtime":1611590166780,"results":"16","hashOfConfig":"11"},{"size":247,"mtime":1611666895505,"results":"17","hashOfConfig":"11"},{"size":321,"mtime":1611668020758,"results":"18","hashOfConfig":"11"},{"size":859,"mtime":1611754865555,"results":"19","hashOfConfig":"11"},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},"15abmaf",{"filePath":"23","messages":"24","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"25","usedDeprecatedRules":"22"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],["40","41"],"/Users/ogiwaramasatoshi/untitled1/src/App.js",["42","43"],"import React, { Component } from 'react'\nimport './App.css'\n// eslint-disable-next-line\nimport Greet from './components/Greet'\n// eslint-disable-next-line\nimport Welcome from \"./components/Welcome\";\n// eslint-disable-next-line\nimport Message from \"./components/Message\";\nimport Function from \"./components/Function\";\nimport ClassClick from \"./components/ClassClick\";\nimport BindingHandler from \"./components/BindingHandler\"\n\n\n\nclass App extends Component{\n render() {\n return(\n
\n \n {/**/}\n {/**/}\n {/**/}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n\n {/**/}\n {/**/}\n
\n );\n }\n}\n\nexport default App;","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Message.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Function.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js",[],{"ruleId":"44","replacedBy":"45"},{"ruleId":"46","replacedBy":"47"},{"ruleId":"48","severity":1,"message":"49","line":9,"column":8,"nodeType":"50","messageId":"51","endLine":9,"endColumn":16},{"ruleId":"48","severity":1,"message":"52","line":10,"column":8,"nodeType":"50","messageId":"51","endLine":10,"endColumn":18},"no-native-reassign",["53"],"no-negated-in-lhs",["54"],"no-unused-vars","'Function' is defined but never used.","Identifier","unusedVar","'ClassClick' is defined but never used.","no-global-assign","no-unsafe-negation"] \ No newline at end of file +[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5","/Users/ogiwaramasatoshi/untitled1/src/components/Message.js":"6","/Users/ogiwaramasatoshi/untitled1/src/components/Function.js":"7","/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js":"8","/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js":"9","/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js":"10","/Users/ogiwaramasatoshi/untitled1/src/components/Children.js":"11"},{"size":500,"mtime":1611136676035,"results":"12","hashOfConfig":"13"},{"size":1109,"mtime":1611838677333,"results":"14","hashOfConfig":"13"},{"size":362,"mtime":1611136676036,"results":"15","hashOfConfig":"13"},{"size":164,"mtime":1611322453240,"results":"16","hashOfConfig":"13"},{"size":205,"mtime":1611323259102,"results":"17","hashOfConfig":"13"},{"size":510,"mtime":1611590166780,"results":"18","hashOfConfig":"13"},{"size":247,"mtime":1611666895505,"results":"19","hashOfConfig":"13"},{"size":321,"mtime":1611668020758,"results":"20","hashOfConfig":"13"},{"size":859,"mtime":1611754865555,"results":"21","hashOfConfig":"13"},{"size":559,"mtime":1611839137515,"results":"22","hashOfConfig":"13"},{"size":224,"mtime":1611839137506,"results":"23","hashOfConfig":"13"},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},"15abmaf",{"filePath":"27","messages":"28","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],["47","48"],"/Users/ogiwaramasatoshi/untitled1/src/App.js",["49","50","51"],"/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Message.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Function.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Children.js",[],{"ruleId":"52","replacedBy":"53"},{"ruleId":"54","replacedBy":"55"},{"ruleId":"56","severity":1,"message":"57","line":9,"column":8,"nodeType":"58","messageId":"59","endLine":9,"endColumn":16},{"ruleId":"56","severity":1,"message":"60","line":10,"column":8,"nodeType":"58","messageId":"59","endLine":10,"endColumn":18},{"ruleId":"56","severity":1,"message":"61","line":11,"column":9,"nodeType":"58","messageId":"59","endLine":11,"endColumn":23},"no-native-reassign",["62"],"no-negated-in-lhs",["63"],"no-unused-vars","'Function' is defined but never used.","Identifier","unusedVar","'ClassClick' is defined but never used.","'BindingHandler' is defined but never used.","no-global-assign","no-unsafe-negation"] \ No newline at end of file diff --git a/src/App.js b/src/App.js index 5fb74f3..dac4c43 100644 --- a/src/App.js +++ b/src/App.js @@ -9,14 +9,16 @@ import Message from "./components/Message"; import Function from "./components/Function"; import ClassClick from "./components/ClassClick"; import BindingHandler from "./components/BindingHandler" - - +import Parent from "./components/Parent"; +import ChildrenComponent from "./components/Children"; class App extends Component{ render() { return(
- + {/**/} + + {/**/} {/**/} {/**/} diff --git a/src/components/Children.js b/src/components/Children.js new file mode 100644 index 0000000..91760a1 --- /dev/null +++ b/src/components/Children.js @@ -0,0 +1,11 @@ +import React from 'react' + +function ChildrenComponent(props) { + return( +
+ +
+ ) +} + +export default ChildrenComponent; \ No newline at end of file diff --git a/src/components/Parent.js b/src/components/Parent.js new file mode 100644 index 0000000..c5a659e --- /dev/null +++ b/src/components/Parent.js @@ -0,0 +1,29 @@ +import React, { Component } from 'react' +import ChildrenComponent from "./Children"; + + +class Parent extends Component{ + constructor(props) { + super(props) + this.state= { + parentName: 'Parent' + } + + this.greetParent= this.greetParent.bind(this) + } + + + greetParent (childName) { + alert(`Bonjour ${this.state.parentName} from ${childName}`) + } + + render() { + return( +
+ +
+ ) + } +} + +export default Parent; \ No newline at end of file From e50dc373e84cda7092e84687f4b6c1cd865f1f1c Mon Sep 17 00:00:00 2001 From: Masatoshi Date: Fri, 29 Jan 2021 16:39:37 +0900 Subject: [PATCH 06/11] 7_rendering_learned --- .eslintcache | 2 +- src/App.js | 12 ++++++++---- src/components/Parent.js | 2 +- src/components/UserGreeting.js | 19 +++++++++++++++++++ 4 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 src/components/UserGreeting.js diff --git a/.eslintcache b/.eslintcache index fd08760..625c45a 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5","/Users/ogiwaramasatoshi/untitled1/src/components/Message.js":"6","/Users/ogiwaramasatoshi/untitled1/src/components/Function.js":"7","/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js":"8","/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js":"9","/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js":"10","/Users/ogiwaramasatoshi/untitled1/src/components/Children.js":"11"},{"size":500,"mtime":1611136676035,"results":"12","hashOfConfig":"13"},{"size":1109,"mtime":1611838677333,"results":"14","hashOfConfig":"13"},{"size":362,"mtime":1611136676036,"results":"15","hashOfConfig":"13"},{"size":164,"mtime":1611322453240,"results":"16","hashOfConfig":"13"},{"size":205,"mtime":1611323259102,"results":"17","hashOfConfig":"13"},{"size":510,"mtime":1611590166780,"results":"18","hashOfConfig":"13"},{"size":247,"mtime":1611666895505,"results":"19","hashOfConfig":"13"},{"size":321,"mtime":1611668020758,"results":"20","hashOfConfig":"13"},{"size":859,"mtime":1611754865555,"results":"21","hashOfConfig":"13"},{"size":559,"mtime":1611839137515,"results":"22","hashOfConfig":"13"},{"size":224,"mtime":1611839137506,"results":"23","hashOfConfig":"13"},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},"15abmaf",{"filePath":"27","messages":"28","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],["47","48"],"/Users/ogiwaramasatoshi/untitled1/src/App.js",["49","50","51"],"/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Message.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Function.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Children.js",[],{"ruleId":"52","replacedBy":"53"},{"ruleId":"54","replacedBy":"55"},{"ruleId":"56","severity":1,"message":"57","line":9,"column":8,"nodeType":"58","messageId":"59","endLine":9,"endColumn":16},{"ruleId":"56","severity":1,"message":"60","line":10,"column":8,"nodeType":"58","messageId":"59","endLine":10,"endColumn":18},{"ruleId":"56","severity":1,"message":"61","line":11,"column":9,"nodeType":"58","messageId":"59","endLine":11,"endColumn":23},"no-native-reassign",["62"],"no-negated-in-lhs",["63"],"no-unused-vars","'Function' is defined but never used.","Identifier","unusedVar","'ClassClick' is defined but never used.","'BindingHandler' is defined but never used.","no-global-assign","no-unsafe-negation"] \ No newline at end of file +[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5","/Users/ogiwaramasatoshi/untitled1/src/components/Message.js":"6","/Users/ogiwaramasatoshi/untitled1/src/components/Function.js":"7","/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js":"8","/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js":"9","/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js":"10","/Users/ogiwaramasatoshi/untitled1/src/components/Children.js":"11","/Users/ogiwaramasatoshi/untitled1/src/components/UserGreeting.js":"12"},{"size":500,"mtime":1611136676035,"results":"13","hashOfConfig":"14"},{"size":1210,"mtime":1611840511767,"results":"15","hashOfConfig":"14"},{"size":362,"mtime":1611136676036,"results":"16","hashOfConfig":"14"},{"size":164,"mtime":1611322453240,"results":"17","hashOfConfig":"14"},{"size":205,"mtime":1611323259102,"results":"18","hashOfConfig":"14"},{"size":510,"mtime":1611590166780,"results":"19","hashOfConfig":"14"},{"size":247,"mtime":1611666895505,"results":"20","hashOfConfig":"14"},{"size":321,"mtime":1611668020758,"results":"21","hashOfConfig":"14"},{"size":859,"mtime":1611754865555,"results":"22","hashOfConfig":"14"},{"size":558,"mtime":1611840504513,"results":"23","hashOfConfig":"14"},{"size":224,"mtime":1611839137506,"results":"24","hashOfConfig":"14"},{"size":333,"mtime":1611842011380,"results":"25","hashOfConfig":"14"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},"15abmaf",{"filePath":"29","messages":"30","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"31","usedDeprecatedRules":"28"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],["53","54"],"/Users/ogiwaramasatoshi/untitled1/src/App.js",["55","56","57"],"import React, { Component } from 'react'\nimport './App.css'\n// eslint-disable-next-line\nimport Greet from './components/Greet'\n// eslint-disable-next-line\nimport Welcome from \"./components/Welcome\";\n// eslint-disable-next-line\nimport Message from \"./components/Message\";\nimport Function from \"./components/Function\";\nimport ClassClick from \"./components/ClassClick\";\nimport BindingHandler from \"./components/BindingHandler\"\n// import Parent from \"./components/Parent\";\n// import ChildrenComponent from \"./components/Children\";\nimport UserGreeting from \"./components/UserGreeting\";\n\n\n\nclass App extends Component{\n render() {\n return(\n
\n {/**/}\n \n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n\n {/**/}\n {/**/}\n
\n );\n }\n}\n\nexport default App;","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Message.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Function.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js",[],["58","59"],"/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Children.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/UserGreeting.js",[],{"ruleId":"60","replacedBy":"61"},{"ruleId":"62","replacedBy":"63"},{"ruleId":"64","severity":1,"message":"65","line":9,"column":8,"nodeType":"66","messageId":"67","endLine":9,"endColumn":16},{"ruleId":"64","severity":1,"message":"68","line":10,"column":8,"nodeType":"66","messageId":"67","endLine":10,"endColumn":18},{"ruleId":"64","severity":1,"message":"69","line":11,"column":9,"nodeType":"66","messageId":"67","endLine":11,"endColumn":23},{"ruleId":"60","replacedBy":"70"},{"ruleId":"62","replacedBy":"71"},"no-native-reassign",["72"],"no-negated-in-lhs",["73"],"no-unused-vars","'Function' is defined but never used.","Identifier","unusedVar","'ClassClick' is defined but never used.","'BindingHandler' is defined but never used.",["72"],["73"],"no-global-assign","no-unsafe-negation"] \ No newline at end of file diff --git a/src/App.js b/src/App.js index dac4c43..a7ca231 100644 --- a/src/App.js +++ b/src/App.js @@ -9,16 +9,20 @@ import Message from "./components/Message"; import Function from "./components/Function"; import ClassClick from "./components/ClassClick"; import BindingHandler from "./components/BindingHandler" -import Parent from "./components/Parent"; -import ChildrenComponent from "./components/Children"; +// import Parent from "./components/Parent"; +// import ChildrenComponent from "./components/Children"; +import UserGreeting from "./components/UserGreeting"; + + class App extends Component{ render() { return(
{/**/} - - + + {/**/} + {/**/} {/**/} {/**/} {/**/} diff --git a/src/components/Parent.js b/src/components/Parent.js index c5a659e..9700fd4 100644 --- a/src/components/Parent.js +++ b/src/components/Parent.js @@ -26,4 +26,4 @@ class Parent extends Component{ } } -export default Parent; \ No newline at end of file +export default Parent \ No newline at end of file diff --git a/src/components/UserGreeting.js b/src/components/UserGreeting.js new file mode 100644 index 0000000..113a171 --- /dev/null +++ b/src/components/UserGreeting.js @@ -0,0 +1,19 @@ +import React, { Component } from 'react' + + +class UserGreeting extends Component { + constructor(props) { + super(props) + this.state = { + isLoggedIn: true + } + } + + render() { + return( + this.state.isLoggedIn &&
Fuck you !!!
+ ) + } + } + + export default UserGreeting; \ No newline at end of file From 44249ed677a67cd36d2fd1dba1efc1f82c417af1 Mon Sep 17 00:00:00 2001 From: Masatoshi Date: Mon, 1 Feb 2021 22:28:20 +0900 Subject: [PATCH 07/11] array_map.method_learned --- .eslintcache | 2 +- src/App.js | 5 +++-- src/components/NameList.js | 11 +++++++++++ src/components/Person.js | 14 ++++++++++++++ 4 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 src/components/NameList.js create mode 100644 src/components/Person.js diff --git a/.eslintcache b/.eslintcache index 625c45a..46a7c07 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5","/Users/ogiwaramasatoshi/untitled1/src/components/Message.js":"6","/Users/ogiwaramasatoshi/untitled1/src/components/Function.js":"7","/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js":"8","/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js":"9","/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js":"10","/Users/ogiwaramasatoshi/untitled1/src/components/Children.js":"11","/Users/ogiwaramasatoshi/untitled1/src/components/UserGreeting.js":"12"},{"size":500,"mtime":1611136676035,"results":"13","hashOfConfig":"14"},{"size":1210,"mtime":1611840511767,"results":"15","hashOfConfig":"14"},{"size":362,"mtime":1611136676036,"results":"16","hashOfConfig":"14"},{"size":164,"mtime":1611322453240,"results":"17","hashOfConfig":"14"},{"size":205,"mtime":1611323259102,"results":"18","hashOfConfig":"14"},{"size":510,"mtime":1611590166780,"results":"19","hashOfConfig":"14"},{"size":247,"mtime":1611666895505,"results":"20","hashOfConfig":"14"},{"size":321,"mtime":1611668020758,"results":"21","hashOfConfig":"14"},{"size":859,"mtime":1611754865555,"results":"22","hashOfConfig":"14"},{"size":558,"mtime":1611840504513,"results":"23","hashOfConfig":"14"},{"size":224,"mtime":1611839137506,"results":"24","hashOfConfig":"14"},{"size":333,"mtime":1611842011380,"results":"25","hashOfConfig":"14"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},"15abmaf",{"filePath":"29","messages":"30","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"31","usedDeprecatedRules":"28"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],["53","54"],"/Users/ogiwaramasatoshi/untitled1/src/App.js",["55","56","57"],"import React, { Component } from 'react'\nimport './App.css'\n// eslint-disable-next-line\nimport Greet from './components/Greet'\n// eslint-disable-next-line\nimport Welcome from \"./components/Welcome\";\n// eslint-disable-next-line\nimport Message from \"./components/Message\";\nimport Function from \"./components/Function\";\nimport ClassClick from \"./components/ClassClick\";\nimport BindingHandler from \"./components/BindingHandler\"\n// import Parent from \"./components/Parent\";\n// import ChildrenComponent from \"./components/Children\";\nimport UserGreeting from \"./components/UserGreeting\";\n\n\n\nclass App extends Component{\n render() {\n return(\n
\n {/**/}\n \n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n\n {/**/}\n {/**/}\n
\n );\n }\n}\n\nexport default App;","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Message.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Function.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js",[],["58","59"],"/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Children.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/UserGreeting.js",[],{"ruleId":"60","replacedBy":"61"},{"ruleId":"62","replacedBy":"63"},{"ruleId":"64","severity":1,"message":"65","line":9,"column":8,"nodeType":"66","messageId":"67","endLine":9,"endColumn":16},{"ruleId":"64","severity":1,"message":"68","line":10,"column":8,"nodeType":"66","messageId":"67","endLine":10,"endColumn":18},{"ruleId":"64","severity":1,"message":"69","line":11,"column":9,"nodeType":"66","messageId":"67","endLine":11,"endColumn":23},{"ruleId":"60","replacedBy":"70"},{"ruleId":"62","replacedBy":"71"},"no-native-reassign",["72"],"no-negated-in-lhs",["73"],"no-unused-vars","'Function' is defined but never used.","Identifier","unusedVar","'ClassClick' is defined but never used.","'BindingHandler' is defined but never used.",["72"],["73"],"no-global-assign","no-unsafe-negation"] \ No newline at end of file +[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5","/Users/ogiwaramasatoshi/untitled1/src/components/Message.js":"6","/Users/ogiwaramasatoshi/untitled1/src/components/Function.js":"7","/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js":"8","/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js":"9","/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js":"10","/Users/ogiwaramasatoshi/untitled1/src/components/Children.js":"11","/Users/ogiwaramasatoshi/untitled1/src/components/UserGreeting.js":"12","/Users/ogiwaramasatoshi/untitled1/src/components/NameList.js":"13","/Users/ogiwaramasatoshi/untitled1/src/components/Person.js":"14"},{"size":500,"mtime":1611136676035,"results":"15","hashOfConfig":"16"},{"size":1284,"mtime":1611906342593,"results":"17","hashOfConfig":"16"},{"size":362,"mtime":1611136676036,"results":"18","hashOfConfig":"16"},{"size":164,"mtime":1611322453240,"results":"19","hashOfConfig":"16"},{"size":205,"mtime":1611323259102,"results":"20","hashOfConfig":"16"},{"size":510,"mtime":1611590166780,"results":"21","hashOfConfig":"16"},{"size":247,"mtime":1611666895505,"results":"22","hashOfConfig":"16"},{"size":321,"mtime":1611668020758,"results":"23","hashOfConfig":"16"},{"size":859,"mtime":1611754865555,"results":"24","hashOfConfig":"16"},{"size":558,"mtime":1611840504513,"results":"25","hashOfConfig":"16"},{"size":224,"mtime":1611839137506,"results":"26","hashOfConfig":"16"},{"size":333,"mtime":1611842011380,"results":"27","hashOfConfig":"16"},{"size":272,"mtime":1612185321569,"results":"28","hashOfConfig":"16"},{"size":260,"mtime":1612097167923,"results":"29","hashOfConfig":"16"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},"15abmaf",{"filePath":"33","messages":"34","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"35","usedDeprecatedRules":"32"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"57","messages":"58","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],["61","62"],"/Users/ogiwaramasatoshi/untitled1/src/App.js",["63","64","65","66"],"import React, { Component } from 'react'\nimport './App.css'\n// eslint-disable-next-line\nimport Greet from './components/Greet'\n// eslint-disable-next-line\nimport Welcome from \"./components/Welcome\";\n// eslint-disable-next-line\nimport Message from \"./components/Message\";\nimport Function from \"./components/Function\";\nimport ClassClick from \"./components/ClassClick\";\nimport BindingHandler from \"./components/BindingHandler\"\n// import Parent from \"./components/Parent\";\n// import ChildrenComponent from \"./components/Children\";\nimport UserGreeting from \"./components/UserGreeting\";\nimport NameList from \"./components/NameList\";\n\n\nclass App extends Component{\n render() {\n return(\n
\n \n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n\n {/**/}\n {/**/}\n
\n );\n }\n}\n\nexport default App;","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Message.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Function.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Children.js",[],["67","68"],"/Users/ogiwaramasatoshi/untitled1/src/components/UserGreeting.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/NameList.js",["69"],"/Users/ogiwaramasatoshi/untitled1/src/components/Person.js",[],{"ruleId":"70","replacedBy":"71"},{"ruleId":"72","replacedBy":"73"},{"ruleId":"74","severity":1,"message":"75","line":9,"column":8,"nodeType":"76","messageId":"77","endLine":9,"endColumn":16},{"ruleId":"74","severity":1,"message":"78","line":10,"column":8,"nodeType":"76","messageId":"77","endLine":10,"endColumn":18},{"ruleId":"74","severity":1,"message":"79","line":11,"column":9,"nodeType":"76","messageId":"77","endLine":11,"endColumn":23},{"ruleId":"74","severity":1,"message":"80","line":14,"column":8,"nodeType":"76","messageId":"77","endLine":14,"endColumn":20},{"ruleId":"70","replacedBy":"81"},{"ruleId":"72","replacedBy":"82"},{"ruleId":"74","severity":1,"message":"83","line":2,"column":8,"nodeType":"76","messageId":"77","endLine":2,"endColumn":14},"no-native-reassign",["84"],"no-negated-in-lhs",["85"],"no-unused-vars","'Function' is defined but never used.","Identifier","unusedVar","'ClassClick' is defined but never used.","'BindingHandler' is defined but never used.","'UserGreeting' is defined but never used.",["84"],["85"],"'Person' is defined but never used.","no-global-assign","no-unsafe-negation"] \ No newline at end of file diff --git a/src/App.js b/src/App.js index a7ca231..6e1e49a 100644 --- a/src/App.js +++ b/src/App.js @@ -12,15 +12,16 @@ import BindingHandler from "./components/BindingHandler" // import Parent from "./components/Parent"; // import ChildrenComponent from "./components/Children"; import UserGreeting from "./components/UserGreeting"; - +import NameList from "./components/NameList"; class App extends Component{ render() { return(
+ {/**/} - + {/**/} {/**/} {/**/} {/**/} diff --git a/src/components/NameList.js b/src/components/NameList.js new file mode 100644 index 0000000..cdb7714 --- /dev/null +++ b/src/components/NameList.js @@ -0,0 +1,11 @@ +import React from 'react' +import Person from "./Person"; + + +function NameList() { + const names =['Buffon','Ronaldo','Dybala'] + const nameList = names.map((name,index) =>

{index} {name}

) + return
{nameList}
+} + +export default NameList ; \ No newline at end of file diff --git a/src/components/Person.js b/src/components/Person.js new file mode 100644 index 0000000..9426de3 --- /dev/null +++ b/src/components/Person.js @@ -0,0 +1,14 @@ +import React from 'react' + + +function Person({person,key}) { + return( +
+

+ {key} I am {person.name}. I am {person.age}. My position is {person.skill}. +

+
+ ) +} + +export default Person ; \ No newline at end of file From ad8a6e11d24f59cc0c51fa9d7277dd31e43444a0 Mon Sep 17 00:00:00 2001 From: Masatoshi Date: Tue, 2 Feb 2021 22:16:09 +0900 Subject: [PATCH 08/11] learned_basic.css --- .eslintcache | 2 +- .idea/inspectionProfiles/Project_Default.xml | 9 +++++++++ src/App.js | 12 +++++++++++- src/appStyles.css | 3 +++ src/appStyles.module.css | 3 +++ src/components/Inline.js | 17 +++++++++++++++++ src/components/Stylesheet.js | 13 +++++++++++++ src/components/myStyles.css | 9 +++++++++ 8 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 src/appStyles.css create mode 100644 src/appStyles.module.css create mode 100644 src/components/Inline.js create mode 100644 src/components/Stylesheet.js create mode 100644 src/components/myStyles.css diff --git a/.eslintcache b/.eslintcache index 46a7c07..75d0ab6 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5","/Users/ogiwaramasatoshi/untitled1/src/components/Message.js":"6","/Users/ogiwaramasatoshi/untitled1/src/components/Function.js":"7","/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js":"8","/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js":"9","/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js":"10","/Users/ogiwaramasatoshi/untitled1/src/components/Children.js":"11","/Users/ogiwaramasatoshi/untitled1/src/components/UserGreeting.js":"12","/Users/ogiwaramasatoshi/untitled1/src/components/NameList.js":"13","/Users/ogiwaramasatoshi/untitled1/src/components/Person.js":"14"},{"size":500,"mtime":1611136676035,"results":"15","hashOfConfig":"16"},{"size":1284,"mtime":1611906342593,"results":"17","hashOfConfig":"16"},{"size":362,"mtime":1611136676036,"results":"18","hashOfConfig":"16"},{"size":164,"mtime":1611322453240,"results":"19","hashOfConfig":"16"},{"size":205,"mtime":1611323259102,"results":"20","hashOfConfig":"16"},{"size":510,"mtime":1611590166780,"results":"21","hashOfConfig":"16"},{"size":247,"mtime":1611666895505,"results":"22","hashOfConfig":"16"},{"size":321,"mtime":1611668020758,"results":"23","hashOfConfig":"16"},{"size":859,"mtime":1611754865555,"results":"24","hashOfConfig":"16"},{"size":558,"mtime":1611840504513,"results":"25","hashOfConfig":"16"},{"size":224,"mtime":1611839137506,"results":"26","hashOfConfig":"16"},{"size":333,"mtime":1611842011380,"results":"27","hashOfConfig":"16"},{"size":272,"mtime":1612185321569,"results":"28","hashOfConfig":"16"},{"size":260,"mtime":1612097167923,"results":"29","hashOfConfig":"16"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},"15abmaf",{"filePath":"33","messages":"34","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"35","usedDeprecatedRules":"32"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"54"},{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"57","messages":"58","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],["61","62"],"/Users/ogiwaramasatoshi/untitled1/src/App.js",["63","64","65","66"],"import React, { Component } from 'react'\nimport './App.css'\n// eslint-disable-next-line\nimport Greet from './components/Greet'\n// eslint-disable-next-line\nimport Welcome from \"./components/Welcome\";\n// eslint-disable-next-line\nimport Message from \"./components/Message\";\nimport Function from \"./components/Function\";\nimport ClassClick from \"./components/ClassClick\";\nimport BindingHandler from \"./components/BindingHandler\"\n// import Parent from \"./components/Parent\";\n// import ChildrenComponent from \"./components/Children\";\nimport UserGreeting from \"./components/UserGreeting\";\nimport NameList from \"./components/NameList\";\n\n\nclass App extends Component{\n render() {\n return(\n
\n \n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n\n {/**/}\n {/**/}\n
\n );\n }\n}\n\nexport default App;","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Message.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Function.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Children.js",[],["67","68"],"/Users/ogiwaramasatoshi/untitled1/src/components/UserGreeting.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/NameList.js",["69"],"/Users/ogiwaramasatoshi/untitled1/src/components/Person.js",[],{"ruleId":"70","replacedBy":"71"},{"ruleId":"72","replacedBy":"73"},{"ruleId":"74","severity":1,"message":"75","line":9,"column":8,"nodeType":"76","messageId":"77","endLine":9,"endColumn":16},{"ruleId":"74","severity":1,"message":"78","line":10,"column":8,"nodeType":"76","messageId":"77","endLine":10,"endColumn":18},{"ruleId":"74","severity":1,"message":"79","line":11,"column":9,"nodeType":"76","messageId":"77","endLine":11,"endColumn":23},{"ruleId":"74","severity":1,"message":"80","line":14,"column":8,"nodeType":"76","messageId":"77","endLine":14,"endColumn":20},{"ruleId":"70","replacedBy":"81"},{"ruleId":"72","replacedBy":"82"},{"ruleId":"74","severity":1,"message":"83","line":2,"column":8,"nodeType":"76","messageId":"77","endLine":2,"endColumn":14},"no-native-reassign",["84"],"no-negated-in-lhs",["85"],"no-unused-vars","'Function' is defined but never used.","Identifier","unusedVar","'ClassClick' is defined but never used.","'BindingHandler' is defined but never used.","'UserGreeting' is defined but never used.",["84"],["85"],"'Person' is defined but never used.","no-global-assign","no-unsafe-negation"] \ No newline at end of file +[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5","/Users/ogiwaramasatoshi/untitled1/src/components/Message.js":"6","/Users/ogiwaramasatoshi/untitled1/src/components/Function.js":"7","/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js":"8","/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js":"9","/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js":"10","/Users/ogiwaramasatoshi/untitled1/src/components/Children.js":"11","/Users/ogiwaramasatoshi/untitled1/src/components/UserGreeting.js":"12","/Users/ogiwaramasatoshi/untitled1/src/components/NameList.js":"13","/Users/ogiwaramasatoshi/untitled1/src/components/Person.js":"14","/Users/ogiwaramasatoshi/untitled1/src/components/Stylesheet.js":"15","/Users/ogiwaramasatoshi/untitled1/src/components/Inline.js":"16"},{"size":500,"mtime":1611136676035,"results":"17","hashOfConfig":"18"},{"size":1624,"mtime":1612271386838,"results":"19","hashOfConfig":"18"},{"size":362,"mtime":1611136676036,"results":"20","hashOfConfig":"18"},{"size":164,"mtime":1611322453240,"results":"21","hashOfConfig":"18"},{"size":205,"mtime":1611323259102,"results":"22","hashOfConfig":"18"},{"size":510,"mtime":1611590166780,"results":"23","hashOfConfig":"18"},{"size":247,"mtime":1611666895505,"results":"24","hashOfConfig":"18"},{"size":321,"mtime":1611668020758,"results":"25","hashOfConfig":"18"},{"size":859,"mtime":1611754865555,"results":"26","hashOfConfig":"18"},{"size":558,"mtime":1611840504513,"results":"27","hashOfConfig":"18"},{"size":224,"mtime":1611839137506,"results":"28","hashOfConfig":"18"},{"size":333,"mtime":1611842011380,"results":"29","hashOfConfig":"18"},{"size":272,"mtime":1612185321569,"results":"30","hashOfConfig":"18"},{"size":260,"mtime":1612097167923,"results":"31","hashOfConfig":"18"},{"size":273,"mtime":1612187425049,"results":"32","hashOfConfig":"18"},{"size":271,"mtime":1612271357327,"results":"33","hashOfConfig":"18"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},"15abmaf",{"filePath":"37","messages":"38","errorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"53","messages":"54","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"57"},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"60","messages":"61","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"62","usedDeprecatedRules":"36"},{"filePath":"63","messages":"64","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"65","messages":"66","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"67","messages":"68","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],["69","70"],"/Users/ogiwaramasatoshi/untitled1/src/App.js",["71","72","73","74","75","76"],"/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Message.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Function.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Children.js",[],["77","78"],"/Users/ogiwaramasatoshi/untitled1/src/components/UserGreeting.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/NameList.js",["79"],"import React from 'react'\nimport Person from \"./Person\";\n\n\nfunction NameList() {\n const names =['Buffon','Ronaldo','Dybala']\n const nameList = names.map((name,index) =>

{index} {name}

)\n return
{nameList}
\n}\n\nexport default NameList ;","/Users/ogiwaramasatoshi/untitled1/src/components/Person.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Stylesheet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Inline.js",[],{"ruleId":"80","replacedBy":"81"},{"ruleId":"82","replacedBy":"83"},{"ruleId":"84","severity":1,"message":"85","line":9,"column":8,"nodeType":"86","messageId":"87","endLine":9,"endColumn":16},{"ruleId":"84","severity":1,"message":"88","line":10,"column":8,"nodeType":"86","messageId":"87","endLine":10,"endColumn":18},{"ruleId":"84","severity":1,"message":"89","line":11,"column":9,"nodeType":"86","messageId":"87","endLine":11,"endColumn":23},{"ruleId":"84","severity":1,"message":"90","line":14,"column":8,"nodeType":"86","messageId":"87","endLine":14,"endColumn":20},{"ruleId":"84","severity":1,"message":"91","line":15,"column":8,"nodeType":"86","messageId":"87","endLine":15,"endColumn":16},{"ruleId":"84","severity":1,"message":"92","line":16,"column":8,"nodeType":"86","messageId":"87","endLine":16,"endColumn":18},{"ruleId":"80","replacedBy":"93"},{"ruleId":"82","replacedBy":"94"},{"ruleId":"84","severity":1,"message":"95","line":2,"column":8,"nodeType":"86","messageId":"87","endLine":2,"endColumn":14},"no-native-reassign",["96"],"no-negated-in-lhs",["97"],"no-unused-vars","'Function' is defined but never used.","Identifier","unusedVar","'ClassClick' is defined but never used.","'BindingHandler' is defined but never used.","'UserGreeting' is defined but never used.","'NameList' is defined but never used.","'Stylesheet' is defined but never used.",["96"],["97"],"'Person' is defined but never used.","no-global-assign","no-unsafe-negation"] \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 0d8d066..1ed1b68 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -5,6 +5,10 @@ + + + + @@ -20,6 +24,7 @@ + @@ -73,6 +78,10 @@ + + diff --git a/src/App.js b/src/App.js index 6e1e49a..e7f8f28 100644 --- a/src/App.js +++ b/src/App.js @@ -13,13 +13,23 @@ import BindingHandler from "./components/BindingHandler" // import ChildrenComponent from "./components/Children"; import UserGreeting from "./components/UserGreeting"; import NameList from "./components/NameList"; +import Stylesheet from "./components/Stylesheet"; +import Inline from "./components/Inline"; +import './appStyles.css'; +import styles from './appStyles.module.css' + + class App extends Component{ render() { return(
- +

Error

+

Success

+ + {/**/} + {/**/} {/**/} {/**/} {/**/} diff --git a/src/appStyles.css b/src/appStyles.css new file mode 100644 index 0000000..9fc7b1e --- /dev/null +++ b/src/appStyles.css @@ -0,0 +1,3 @@ +.error { + color: red; +} \ No newline at end of file diff --git a/src/appStyles.module.css b/src/appStyles.module.css new file mode 100644 index 0000000..9e1144a --- /dev/null +++ b/src/appStyles.module.css @@ -0,0 +1,3 @@ +.success { + color: blue; +} \ No newline at end of file diff --git a/src/components/Inline.js b/src/components/Inline.js new file mode 100644 index 0000000..e6f47cb --- /dev/null +++ b/src/components/Inline.js @@ -0,0 +1,17 @@ +import React from 'react' + +const heading = { + fontsize: '75px', + color: 'orange' +} + +function Inline() { + return( +
+

Error

+

Inline

+
+ ) +} + +export default Inline \ No newline at end of file diff --git a/src/components/Stylesheet.js b/src/components/Stylesheet.js new file mode 100644 index 0000000..5651f4b --- /dev/null +++ b/src/components/Stylesheet.js @@ -0,0 +1,13 @@ +import React from 'react' +import './myStyles.css' + +function Stylesheet(props) { + let className = props.primary? 'primary' : '' + return( +
+

Stylesheet

+
+ ) +} + +export default Stylesheet ; \ No newline at end of file diff --git a/src/components/myStyles.css b/src/components/myStyles.css new file mode 100644 index 0000000..77cec43 --- /dev/null +++ b/src/components/myStyles.css @@ -0,0 +1,9 @@ + + +.primary{ + color: orange; +} + +.font-xl { + font-size: 72px; +} From 3cc6b52656f2f5a4651bd3cf7b16b2abe43caab0 Mon Sep 17 00:00:00 2001 From: Masatoshi Date: Wed, 3 Feb 2021 20:28:54 +0900 Subject: [PATCH 09/11] FormHandling_learned --- .eslintcache | 2 +- src/App.js | 2 ++ src/components/Form.js | 64 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 src/components/Form.js diff --git a/.eslintcache b/.eslintcache index 75d0ab6..4af118a 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5","/Users/ogiwaramasatoshi/untitled1/src/components/Message.js":"6","/Users/ogiwaramasatoshi/untitled1/src/components/Function.js":"7","/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js":"8","/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js":"9","/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js":"10","/Users/ogiwaramasatoshi/untitled1/src/components/Children.js":"11","/Users/ogiwaramasatoshi/untitled1/src/components/UserGreeting.js":"12","/Users/ogiwaramasatoshi/untitled1/src/components/NameList.js":"13","/Users/ogiwaramasatoshi/untitled1/src/components/Person.js":"14","/Users/ogiwaramasatoshi/untitled1/src/components/Stylesheet.js":"15","/Users/ogiwaramasatoshi/untitled1/src/components/Inline.js":"16"},{"size":500,"mtime":1611136676035,"results":"17","hashOfConfig":"18"},{"size":1624,"mtime":1612271386838,"results":"19","hashOfConfig":"18"},{"size":362,"mtime":1611136676036,"results":"20","hashOfConfig":"18"},{"size":164,"mtime":1611322453240,"results":"21","hashOfConfig":"18"},{"size":205,"mtime":1611323259102,"results":"22","hashOfConfig":"18"},{"size":510,"mtime":1611590166780,"results":"23","hashOfConfig":"18"},{"size":247,"mtime":1611666895505,"results":"24","hashOfConfig":"18"},{"size":321,"mtime":1611668020758,"results":"25","hashOfConfig":"18"},{"size":859,"mtime":1611754865555,"results":"26","hashOfConfig":"18"},{"size":558,"mtime":1611840504513,"results":"27","hashOfConfig":"18"},{"size":224,"mtime":1611839137506,"results":"28","hashOfConfig":"18"},{"size":333,"mtime":1611842011380,"results":"29","hashOfConfig":"18"},{"size":272,"mtime":1612185321569,"results":"30","hashOfConfig":"18"},{"size":260,"mtime":1612097167923,"results":"31","hashOfConfig":"18"},{"size":273,"mtime":1612187425049,"results":"32","hashOfConfig":"18"},{"size":271,"mtime":1612271357327,"results":"33","hashOfConfig":"18"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},"15abmaf",{"filePath":"37","messages":"38","errorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"53","messages":"54","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"57"},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"60","messages":"61","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"62","usedDeprecatedRules":"36"},{"filePath":"63","messages":"64","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},{"filePath":"65","messages":"66","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"67","messages":"68","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"36"},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],["69","70"],"/Users/ogiwaramasatoshi/untitled1/src/App.js",["71","72","73","74","75","76"],"/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Message.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Function.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Children.js",[],["77","78"],"/Users/ogiwaramasatoshi/untitled1/src/components/UserGreeting.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/NameList.js",["79"],"import React from 'react'\nimport Person from \"./Person\";\n\n\nfunction NameList() {\n const names =['Buffon','Ronaldo','Dybala']\n const nameList = names.map((name,index) =>

{index} {name}

)\n return
{nameList}
\n}\n\nexport default NameList ;","/Users/ogiwaramasatoshi/untitled1/src/components/Person.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Stylesheet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Inline.js",[],{"ruleId":"80","replacedBy":"81"},{"ruleId":"82","replacedBy":"83"},{"ruleId":"84","severity":1,"message":"85","line":9,"column":8,"nodeType":"86","messageId":"87","endLine":9,"endColumn":16},{"ruleId":"84","severity":1,"message":"88","line":10,"column":8,"nodeType":"86","messageId":"87","endLine":10,"endColumn":18},{"ruleId":"84","severity":1,"message":"89","line":11,"column":9,"nodeType":"86","messageId":"87","endLine":11,"endColumn":23},{"ruleId":"84","severity":1,"message":"90","line":14,"column":8,"nodeType":"86","messageId":"87","endLine":14,"endColumn":20},{"ruleId":"84","severity":1,"message":"91","line":15,"column":8,"nodeType":"86","messageId":"87","endLine":15,"endColumn":16},{"ruleId":"84","severity":1,"message":"92","line":16,"column":8,"nodeType":"86","messageId":"87","endLine":16,"endColumn":18},{"ruleId":"80","replacedBy":"93"},{"ruleId":"82","replacedBy":"94"},{"ruleId":"84","severity":1,"message":"95","line":2,"column":8,"nodeType":"86","messageId":"87","endLine":2,"endColumn":14},"no-native-reassign",["96"],"no-negated-in-lhs",["97"],"no-unused-vars","'Function' is defined but never used.","Identifier","unusedVar","'ClassClick' is defined but never used.","'BindingHandler' is defined but never used.","'UserGreeting' is defined but never used.","'NameList' is defined but never used.","'Stylesheet' is defined but never used.",["96"],["97"],"'Person' is defined but never used.","no-global-assign","no-unsafe-negation"] \ No newline at end of file +[{"/Users/ogiwaramasatoshi/untitled1/src/index.js":"1","/Users/ogiwaramasatoshi/untitled1/src/App.js":"2","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js":"3","/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js":"4","/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js":"5","/Users/ogiwaramasatoshi/untitled1/src/components/Message.js":"6","/Users/ogiwaramasatoshi/untitled1/src/components/Function.js":"7","/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js":"8","/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js":"9","/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js":"10","/Users/ogiwaramasatoshi/untitled1/src/components/Children.js":"11","/Users/ogiwaramasatoshi/untitled1/src/components/UserGreeting.js":"12","/Users/ogiwaramasatoshi/untitled1/src/components/NameList.js":"13","/Users/ogiwaramasatoshi/untitled1/src/components/Person.js":"14","/Users/ogiwaramasatoshi/untitled1/src/components/Stylesheet.js":"15","/Users/ogiwaramasatoshi/untitled1/src/components/Inline.js":"16","/Users/ogiwaramasatoshi/untitled1/src/components/Form.js":"17"},{"size":500,"mtime":1611136676035,"results":"18","hashOfConfig":"19"},{"size":1681,"mtime":1612272605461,"results":"20","hashOfConfig":"19"},{"size":362,"mtime":1611136676036,"results":"21","hashOfConfig":"19"},{"size":164,"mtime":1611322453240,"results":"22","hashOfConfig":"19"},{"size":205,"mtime":1611323259102,"results":"23","hashOfConfig":"19"},{"size":510,"mtime":1611590166780,"results":"24","hashOfConfig":"19"},{"size":247,"mtime":1611666895505,"results":"25","hashOfConfig":"19"},{"size":321,"mtime":1611668020758,"results":"26","hashOfConfig":"19"},{"size":859,"mtime":1611754865555,"results":"27","hashOfConfig":"19"},{"size":558,"mtime":1611840504513,"results":"28","hashOfConfig":"19"},{"size":224,"mtime":1611839137506,"results":"29","hashOfConfig":"19"},{"size":333,"mtime":1611842011380,"results":"30","hashOfConfig":"19"},{"size":272,"mtime":1612185321569,"results":"31","hashOfConfig":"19"},{"size":260,"mtime":1612097167923,"results":"32","hashOfConfig":"19"},{"size":273,"mtime":1612187425049,"results":"33","hashOfConfig":"19"},{"size":271,"mtime":1612271357327,"results":"34","hashOfConfig":"19"},{"size":1426,"mtime":1612351701890,"results":"35","hashOfConfig":"19"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},"15abmaf",{"filePath":"39","messages":"40","errorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":"41","usedDeprecatedRules":"38"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"60"},{"filePath":"61","messages":"62","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"63","messages":"64","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"65","usedDeprecatedRules":"38"},{"filePath":"66","messages":"67","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"68","messages":"69","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"70","messages":"71","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"72","messages":"73","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/ogiwaramasatoshi/untitled1/src/index.js",[],["74","75"],"/Users/ogiwaramasatoshi/untitled1/src/App.js",["76","77","78","79","80","81"],"import React, { Component } from 'react'\nimport './App.css'\n// eslint-disable-next-line\nimport Greet from './components/Greet'\n// eslint-disable-next-line\nimport Welcome from \"./components/Welcome\";\n// eslint-disable-next-line\nimport Message from \"./components/Message\";\nimport Function from \"./components/Function\";\nimport ClassClick from \"./components/ClassClick\";\nimport BindingHandler from \"./components/BindingHandler\"\n// import Parent from \"./components/Parent\";\n// import ChildrenComponent from \"./components/Children\";\nimport UserGreeting from \"./components/UserGreeting\";\nimport NameList from \"./components/NameList\";\nimport Stylesheet from \"./components/Stylesheet\";\nimport Inline from \"./components/Inline\";\nimport './appStyles.css';\nimport styles from './appStyles.module.css'\nimport Form from \"./components/Form\";\n\n\n\n\nclass App extends Component{\n render() {\n return(\n
\n

Error

\n

Success

\n
\n \n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/**/}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n\n {/**/}\n {/**/}\n
\n );\n }\n}\n\nexport default App;","/Users/ogiwaramasatoshi/untitled1/src/reportWebVitals.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Greet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Welcome.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Message.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Function.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/ClassClick.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/BindingHandler.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Parent.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Children.js",[],["82","83"],"/Users/ogiwaramasatoshi/untitled1/src/components/UserGreeting.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/NameList.js",["84"],"import React from 'react'\nimport Person from \"./Person\";\n\n\nfunction NameList() {\n const names =['Buffon','Ronaldo','Dybala']\n const nameList = names.map((name,index) =>

{index} {name}

)\n return
{nameList}
\n}\n\nexport default NameList ;","/Users/ogiwaramasatoshi/untitled1/src/components/Person.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Stylesheet.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Inline.js",[],"/Users/ogiwaramasatoshi/untitled1/src/components/Form.js",[],{"ruleId":"85","replacedBy":"86"},{"ruleId":"87","replacedBy":"88"},{"ruleId":"89","severity":1,"message":"90","line":9,"column":8,"nodeType":"91","messageId":"92","endLine":9,"endColumn":16},{"ruleId":"89","severity":1,"message":"93","line":10,"column":8,"nodeType":"91","messageId":"92","endLine":10,"endColumn":18},{"ruleId":"89","severity":1,"message":"94","line":11,"column":9,"nodeType":"91","messageId":"92","endLine":11,"endColumn":23},{"ruleId":"89","severity":1,"message":"95","line":14,"column":8,"nodeType":"91","messageId":"92","endLine":14,"endColumn":20},{"ruleId":"89","severity":1,"message":"96","line":15,"column":8,"nodeType":"91","messageId":"92","endLine":15,"endColumn":16},{"ruleId":"89","severity":1,"message":"97","line":16,"column":8,"nodeType":"91","messageId":"92","endLine":16,"endColumn":18},{"ruleId":"85","replacedBy":"98"},{"ruleId":"87","replacedBy":"99"},{"ruleId":"89","severity":1,"message":"100","line":2,"column":8,"nodeType":"91","messageId":"92","endLine":2,"endColumn":14},"no-native-reassign",["101"],"no-negated-in-lhs",["102"],"no-unused-vars","'Function' is defined but never used.","Identifier","unusedVar","'ClassClick' is defined but never used.","'BindingHandler' is defined but never used.","'UserGreeting' is defined but never used.","'NameList' is defined but never used.","'Stylesheet' is defined but never used.",["101"],["102"],"'Person' is defined but never used.","no-global-assign","no-unsafe-negation"] \ No newline at end of file diff --git a/src/App.js b/src/App.js index e7f8f28..2ca992a 100644 --- a/src/App.js +++ b/src/App.js @@ -17,6 +17,7 @@ import Stylesheet from "./components/Stylesheet"; import Inline from "./components/Inline"; import './appStyles.css'; import styles from './appStyles.module.css' +import Form from "./components/Form"; @@ -27,6 +28,7 @@ class App extends Component{

Error

Success

+ {/**/} {/**/} diff --git a/src/components/Form.js b/src/components/Form.js new file mode 100644 index 0000000..3e6dcd9 --- /dev/null +++ b/src/components/Form.js @@ -0,0 +1,64 @@ +import React, { Component } from 'react' + + class Form extends Component{ + constructor(props) { + super(props) + this.state = { + username: '', + comments: '', + topics: '' + + } + } + + handleUsernameChange = (event) => { + this.setState({ + username: event.target.value + }) + } + + handleCommentsChange = (event) => { + this.setState({ + comments: event.target.value + }) + } + + handleTopicsChange = (event) => { + this.setState({ + topics: event.target.value + }) + } + + + render() { + const { username, comments, topic } = this.state + return( + +
+ Username + +
+ +
+ +