Skip to content

Commit 5bc8c34

Browse files
committed
1.7.9
1 parent e5ed773 commit 5bc8c34

File tree

6 files changed

+1070
-1372
lines changed

6 files changed

+1070
-1372
lines changed

babel.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff 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
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
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
}

src/App.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ import React from 'react';
22

33
import 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+
};

src/component/HelloWorld.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import 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+
};

src/component/index.module.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.hello {
2+
border: 1px solid lightblue;
3+
padding: 15px;
4+
width: 200px;
5+
}

0 commit comments

Comments
 (0)