Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 54b9917

Browse files
Added atnd to the project.
1 parent a2eb207 commit 54b9917

File tree

5 files changed

+927
-20
lines changed

5 files changed

+927
-20
lines changed

‎react-hooks/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6+
"antd": "^3.25.0",
67
"react": "^16.11.0",
78
"react-dom": "^16.11.0",
89
"react-scripts": "3.2.0"

‎react-hooks/src/App.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
import React from 'react';
2-
import logo from './logo.svg';
2+
import { Input } from 'antd';
3+
import 'antd/es/input/style/index.css';
34
import './App.css';
45

56

67
/**
78
* In short, you can now use state, and other React features, within your functional React components.
89
* So, you don’t need a class to use state!
10+
* The biggest part to learn about hooks is the new way of declaring state. So as the first part of this app, let’s set up a component with state, the hooks way.
911
*/
1012

11-
function App() {
13+
const App=()=> {
1214
return (
13-
<div className="App">
14-
15+
<div className="container">
16+
<h2>Type something...</h2>
17+
<Input placeholder="Basic usage"/>
1518
</div>
16-
);
19+
)
1720
}
18-
1921
export default App;

‎react-hooks/src/index.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
/*@import '~antd/dist/antd.css';*/
13
body {
24
margin: 0;
35
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
@@ -11,3 +13,8 @@ code {
1113
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
1214
monospace;
1315
}
16+
17+
.container {
18+
margin: 2em;
19+
width: 600px;
20+
}

‎react-hooks/src/logo.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /