Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Commit

Permalink
Modify files
Browse files Browse the repository at this point in the history
  • Loading branch information
ejolie committed May 28, 2019
1 parent baff54b commit af429e7
Show file tree
Hide file tree
Showing 23 changed files with 107 additions and 25,754 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "docs/react/fb-react-bootcamp/day2/react-fed"]
path = docs/react/fb-react-bootcamp/day2/react-fed
url = https://github.com/thomasjang/react-fed
103 changes: 103 additions & 0 deletions docs/react/fb-react-bootcamp/day2/day2.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,115 @@ module.exports = {

### 시작하기

#### 1. 설치

```bash
npm install antd styled-components @types/styled-components
```

#### 2. antd css import

ts 파일에서 import 해서 작업하는게 용이해서 index.ts 파일도 만듦

```
- styled/
- less/
- index.less
- index.ts
```

```less
// index.less
@import "~antd/dist/antd.less";
```

```ts
// index.ts
import "./less/index.less";
```

#### 3. error

antd의 문제

less loader에 inline을 enable해줘야 함

less는 동적으로 변수를 받아 주입할 수 있는 시스템이 있어서

```js
// craco.config.js
const CracoLessPlugin = require("craco-less");

module.exports = {
plugins: [
{
plugin: CracoLessPlugin,
options: {
lessLoaderOptions: {
javascriptEnabled: true
}
}
}
]
};
```

### 로그인 폼 만들기

antd는 form validation이 훌륭

## 3-2. Markdown

### 시작하기

#### 1. 마크다운 패키지 설치

react-markdown vs markdown-to-jsx

- 패키지 선택 기준
- dependency가 적어야 좋음
- 다운로드 추이

```bash
npm install markdown-to-jsx @types/markdown-to-jsx
```

#### 2. raw loader 설치 및 설정

```bash
npm install craco-raw-loader
```

```js
// craco.config.js
const rawLoader = require("craco-raw-loader");

module.exports = {
plugins: [
{
plugin: rawLoader,
options: {
test: /\.(md|txt)$/
}
}
]
};
```

## 4. Style and Theme in React.JS

### Flexbox

- direction : column과 row
- row : flexbox 안의 아이템들이 좌에서 우로
- column : flexbox 안의 아이템들이 위에서 아래로
- justify
- align



## 5. 효율적인 코드 작성 (destructuring, async, await)



## 6. Drag & Resizing (Resizing, ellipsis)
1 change: 1 addition & 0 deletions docs/react/fb-react-bootcamp/day2/react-fed
Submodule react-fed added at fcfd9a
23 changes: 0 additions & 23 deletions docs/react/fb-react-bootcamp/day2/react-fed2/.gitignore

This file was deleted.

44 changes: 0 additions & 44 deletions docs/react/fb-react-bootcamp/day2/react-fed2/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/react/fb-react-bootcamp/day2/react-fed2/craco.config.js

This file was deleted.

Loading

0 comments on commit af429e7

Please sign in to comment.