File tree Expand file tree Collapse file tree 6 files changed +1070
-1372
lines changed Expand file tree Collapse file tree 6 files changed +1070
-1372
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,5 @@ module.exports = {
44 ] ,
55 plugins : [
66 '@babel/plugin-syntax-dynamic-import' ,
7- '@babel/plugin-proposal-class-properties' ,
8- '@babel/plugin-proposal-object-rest-spread' ,
97 ] ,
108} ;
Original file line number Diff line number Diff line change 1414 "react-dom" : " ^16.9.0"
1515 },
1616 "devDependencies" : {
17- "react-cli-service" : " ^1.7.7"
17+ "eslint" : " ^6.2.1" ,
18+ "react-cli-service" : " ^1.7.9"
1819 }
1920}
Original file line number Diff line number Diff line change @@ -2,14 +2,12 @@ import React from 'react';
22
33import HelloWorld from 'src/component/HelloWorld' ;
44
5- export default class App extends React . Component {
5+ export default ( ) => {
66
7- render ( ) {
8- return (
9- < div >
10- < h1 > Demo</ h1 >
11- < HelloWorld />
12- </ div >
13- ) ;
14- }
15- }
7+ return (
8+ < div >
9+ < h1 > React App</ h1 >
10+ < HelloWorld />
11+ </ div >
12+ ) ;
13+ } ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
22
3- export default class HelloWorld extends React . Component {
3+ import styles from './index.module.css' ;
44
5- render ( ) {
6- return (
7- < div >
8- < h2 > Hello </ h2 >
9- < p > React Cli Service </ p >
10- </ div >
11- ) ;
12- }
13- }
5+ export default ( ) => {
6+
7+ return (
8+ < div className = { styles . hello } >
9+ < h2 > Hello Component </ h2 >
10+ < p > React Cli Service </ p >
11+ </ div >
12+ ) ;
13+ } ;
Original file line number Diff line number Diff line change 1+ .hello {
2+ border : 1px solid lightblue;
3+ padding : 15px ;
4+ width : 200px ;
5+ }
You can’t perform that action at this time.
0 commit comments