Skip to content

Commit 876cd5e

Browse files
authored
Merge branch 'main' into sync-1697ae89
2 parents 214af4b + 37292f1 commit 876cd5e

10 files changed

Lines changed: 320 additions & 323 deletions

File tree

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
name: Textlint Lint
2-
3-
on:
4-
push:
5-
branches:
6-
- main
7-
paths:
8-
- 'src/**/*.md'
9-
- 'textlint/**/*.js'
10-
- '.github/workflows/textlint_lint.yml'
11-
12-
pull_request:
13-
types:
14-
- opened
15-
- synchronize
16-
- reopened
17-
paths:
18-
- 'src/**/*.md'
19-
- 'textlint/**/*.js'
20-
- '.github/workflows/textlint_lint.yml'
21-
22-
jobs:
23-
Lint:
24-
runs-on: ubuntu-latest
25-
26-
steps:
27-
- name: Set up checkout
28-
uses: actions/checkout@v4
29-
30-
- name: Set up node
31-
uses: actions/setup-node@v4
32-
with:
33-
node-version: 20.x
34-
cache: yarn
35-
36-
- name: Set up cache
37-
uses: actions/cache@v4
38-
with:
39-
path: ~/.yarn-cache
40-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
41-
42-
- name: Install dependencies
43-
run: yarn install --frozen-lockfile
44-
# The `--frozen-lockfile` flag in Yarn ensures that dependencies are installed without modifying the `yarn.lock` file. It is useful for maintaining consistency in CI/CD environments by preventing unexpected changes to the lock file and ensuring that the same versions of dependencies are installed.
45-
46-
- name: Lint
47-
run: yarn textlint-lint
1+
name: Textlint Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'src/**/*.md'
9+
- 'textlint/**/*.js'
10+
- '.github/workflows/textlint_lint.yml'
11+
12+
pull_request:
13+
types:
14+
- opened
15+
- synchronize
16+
- reopened
17+
paths:
18+
- 'src/**/*.md'
19+
- 'textlint/**/*.js'
20+
- '.github/workflows/textlint_lint.yml'
21+
22+
jobs:
23+
Lint:
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- name: Set up checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Set up node
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 20.x
34+
cache: yarn
35+
36+
- name: Set up cache
37+
uses: actions/cache@v4
38+
with:
39+
path: ~/.yarn-cache
40+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
41+
42+
- name: Install dependencies
43+
run: yarn install --frozen-lockfile
44+
# The `--frozen-lockfile` flag in Yarn ensures that dependencies are installed without modifying the `yarn.lock` file. It is useful for maintaining consistency in CI/CD environments by preventing unexpected changes to the lock file and ensuring that the same versions of dependencies are installed.
45+
46+
- name: Lint
47+
run: yarn textlint-lint
Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
1-
name: Textlint Test
2-
3-
on:
4-
push:
5-
branches:
6-
- main
7-
paths:
8-
- 'textlint/**/*.js'
9-
- '.github/workflows/textlint_test.yml'
10-
11-
pull_request:
12-
types:
13-
- opened
14-
- synchronize
15-
- reopened
16-
paths:
17-
- 'textlint/**/*.js'
18-
- '.github/workflows/textlint_test.yml'
19-
20-
jobs:
21-
Test:
22-
runs-on: ubuntu-latest
23-
24-
steps:
25-
- name: Set up checkout
26-
uses: actions/checkout@v4
27-
28-
- name: Set up node
29-
uses: actions/setup-node@v4
30-
with:
31-
node-version: 20.x
32-
cache: yarn
33-
34-
- name: Set up cache
35-
uses: actions/cache@v4
36-
with:
37-
path: ~/.yarn-cache
38-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
39-
40-
- name: Install dependencies
41-
run: yarn install --frozen-lockfile
42-
# The `--frozen-lockfile` flag in Yarn ensures that dependencies are installed without modifying the `yarn.lock` file. It is useful for maintaining consistency in CI/CD environments by preventing unexpected changes to the lock file and ensuring that the same versions of dependencies are installed.
43-
44-
- name: Test
45-
run: yarn textlint-test
1+
name: Textlint Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'textlint/**/*.js'
9+
- '.github/workflows/textlint_test.yml'
10+
11+
pull_request:
12+
types:
13+
- opened
14+
- synchronize
15+
- reopened
16+
paths:
17+
- 'textlint/**/*.js'
18+
- '.github/workflows/textlint_test.yml'
19+
20+
jobs:
21+
Test:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Set up checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Set up node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 20.x
32+
cache: yarn
33+
34+
- name: Set up cache
35+
uses: actions/cache@v4
36+
with:
37+
path: ~/.yarn-cache
38+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
39+
40+
- name: Install dependencies
41+
run: yarn install --frozen-lockfile
42+
# The `--frozen-lockfile` flag in Yarn ensures that dependencies are installed without modifying the `yarn.lock` file. It is useful for maintaining consistency in CI/CD environments by preventing unexpected changes to the lock file and ensuring that the same versions of dependencies are installed.
43+
44+
- name: Test
45+
run: yarn textlint-test

.husky/common.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#!/bin/sh
2-
command_exists () {
3-
command -v "$1" >/dev/null 2>&1
4-
}
5-
6-
# Windows 10, Git Bash and Yarn workaround
7-
if command_exists winpty && test -t 1; then
8-
exec < /dev/tty
9-
fi
1+
#!/bin/sh
2+
command_exists () {
3+
command -v "$1" >/dev/null 2>&1
4+
}
5+
6+
# Windows 10, Git Bash and Yarn workaround
7+
if command_exists winpty && test -t 1; then
8+
exec < /dev/tty
9+
fi

src/components/Layout/Feedback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function SendFeedback({onSubmit}: {onSubmit: () => void}) {
6363
return (
6464
<div
6565
className={cn(
66-
'max-w-custom-xs w-80 lg:w-auto py-3 shadow-lg rounded-lg m-4 bg-wash dark:bg-gray-95 px-4 flex',
66+
'max-w-96 w-80 lg:w-auto py-3 shadow-lg rounded-lg m-4 bg-wash dark:bg-gray-95 px-4 flex',
6767
{exit: isSubmitted}
6868
)}>
6969
<p className="w-full text-lg font-bold text-primary dark:text-primary-dark me-4">

src/content/learn/keeping-components-pure.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,12 @@ React에선, **사이드 이펙트는 보통 [이벤트 핸들러](/learn/respon
219219
* **자신의 일에 집중합니다.** 렌더링전에 존재했던 객체나 변수를 변경하지 않아야 합니다.
220220
* **같은 입력, 같은 결과물.** 입력이 같을 경우, 컴포넌트는 항상 같은 JSX를 반환해야 합니다.
221221
* 렌더링은 언제든지 발생할 수 있으므로 컴포넌트는 서로의 렌더링 순서에 의존하지 않아야 합니다.
222-
* 컴포넌트가 렌더링을 위해 사용되는 입력을 변형해서는 안 됩니다. 여기에는 프로퍼티즈, 상태, 그리고 컨텍스트가 포함됩니다. 화면을 업데이트하려면 기존 객체를 변환하는 대신 [상태를 "설정"](/learn/state-a-components-memory)하십시오.
222+
* 컴포넌트가 렌더링을 위해 사용되는 입력을 변형해서는 안 됩니다. 여기에는 Props, 상태, 그리고 컨텍스트가 포함됩니다. 화면을 업데이트하려면 기존 객체를 변환하는 대신 [상태를 "설정"](/learn/state-a-components-memory)하십시오.
223223
* 반환하는 JSX에서 컴포넌트의 로직을 표현하기 위해 노력하십시오. "무언가를 변경"해야 할 경우 일반적으로 이벤트 핸들러에서 변경하고 싶을 것입니다. 마지막 수단으로 `useEffect`를 사용할 수 있습니다.
224224
* 순수 함수를 작성하는 것은 약간의 연습이 필요하지만, React 패러다임의 힘을 풀어줍니다.
225225

226226
</Recap>
227227

228-
229-
230228
<Challenges>
231229

232230
#### 고장난 시계를 고쳐보세요 {/*fix-a-broken-clock*/}
@@ -477,7 +475,7 @@ h1 { margin: 5px; font-size: 18px; }
477475

478476
문제는 `Profile` 컴포넌트가 기존 변수인 `currentPerson`를 수정하고 `Header``Avatar` 컴포넌트가 이 변수를 읽는다는 점이다. 이것은 *세 가지 모두*를 순수하지 않게 만들고 예측하기 어렵게 만듭니다.
479477

480-
버그를 수정하려면 `currentPerson` 변수를 제거하세요. 대신 프로퍼티즈를 통해 `Profile`의 모든 정보를 `Header``Avatar`로 전달하세요. 두 컴포넌트에 `person` 프로퍼티를 추가해서 끝까지 전달해야 합니다.
478+
버그를 수정하려면 `currentPerson` 변수를 제거하세요. 대신 Props를 통해 `Profile`의 모든 정보를 `Header``Avatar`로 전달하세요. 두 컴포넌트에 `person` 프로퍼티를 추가해서 끝까지 전달해야 합니다.
481479

482480
<Sandpack>
483481

src/content/learn/removing-effect-dependencies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,9 +1248,9 @@ Effect 내부에서 `count`를 읽는 대신 `c => c + 1` 명령어("이 숫자
12481248
12491249
#### 애니메이션을 다시 촉발하는 현상 고치기 {/*fix-a-retriggering-animation*/}
12501250
1251-
이 예시에서는 "Show"를 누르면 환영 메시지가 페이드인 합니다. 애니메이션은 1초 정도 걸립니다."Remove"를 누르면 환영 메시지가 즉시 사라집니다. 페이드인 애니메이션의 로직은 `animation.js` 파일에서 일반 자바스크립트 애니메이션 루프로 구현됩니다. 이 로직을 변경할 필요는 없습니다. 서드파티 라이브러리로 처리하면 됩니다. Effect는 노드에 대한 `FadeInAnimation` 인스턴스를 생성한 다음 `start(duration)` 또는 `stop()`을 호출하여 애니메이션을 제어합니다. `duration`은 슬라이더로 제어합니다. 슬라이더를 조정하여 애니메이션이 어떻게 변하는지 확인하세요.
1251+
이 예시에서는 "Show"를 누르면 환영 메시지가 페이드인 합니다. 애니메이션은 1초 정도 걸립니다."Remove"를 누르면 환영 메시지가 즉시 사라집니다. 페이드인 애니메이션의 로직은 `animation.js` 파일에서 일반 자바스크립트 애니메이션 루프로 구현됩니다. 이 로직을 변경할 필요는 없습니다. 서드파티 라이브러리로 처리하면 됩니다. Effect는 DOM 노드에 대한 `FadeInAnimation` 인스턴스를 생성한 다음 `start(duration)` 또는 `stop()`을 호출하여 애니메이션을 제어합니다. `duration`은 슬라이더로 제어합니다. 슬라이더를 조정하여 애니메이션이 어떻게 변하는지 확인하세요.
12521252
1253-
이 코드는 이미 작동하지만 변경하고 싶은 부분이 있습니다. 현재 `duration` State 변수를 제어하는 슬라이더를 움직이면 애니메이션이 다시 촉발됩니다. Effect가 `duration` 변수에 "반응"하지 않도록 동작을 변경하세요. "Show"를 누르면 Effect는 슬라이더의 현재 `duration을` 사용해야 합니다. 그러나 슬라이더를 움직이는 것만으로 애니메이션이 다시 촉발되어서는 안 됩니다.
1253+
이 코드는 이미 작동하지만 변경하고 싶은 부분이 있습니다. 현재 `duration` State 변수를 제어하는 슬라이더를 움직이면 애니메이션이 다시 촉발됩니다. Effect가 `duration` 변수에 "반응"하지 않도록 동작을 변경하세요. "Show"를 누르면 Effect는 슬라이더의 현재 `duration` 사용해야 합니다. 그러나 슬라이더를 움직이는 것만으로 애니메이션이 다시 촉발되어서는 안 됩니다.
12541254
12551255
<Hint>
12561256

0 commit comments

Comments
 (0)