Skip to content

Commit 4952d81

Browse files
authored
docs: cacheSignal 번역 (#1391)
<!-- PR을 보내주셔서 감사합니다! 여러분과 같은 기여자들이 React를 더욱 멋지게 만듭니다! 기존 이슈와 관련된 PR이라면, 아래에 이슈 번호를 추가해주세요. --> # cacheSignal 페이지 번역 #1360 ko.React 공식 문서의 [cacheSignal](https://ko.react.dev/reference/react/cacheSignal) 페이지 번역을 완료하였습니다. ## 필수 확인 사항 - [x] [기여자 행동 강령 규약<sup>Code of Conduct</sup>](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인<sup>Contributing</sup>](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드<sup>Universal Style Guide</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례<sup>Best Practices for Translation</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리<sup>Translate Glossary</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드<sup>Textlint Guide</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사<sup>Spelling Check</sup>](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성<sup>Draft Translation</sup> - [ ] 리뷰 반영<sup>Resolve Reviews</sup>
1 parent f9324ab commit 4952d81

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

src/content/reference/react/cacheSignal.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ title: cacheSignal
44

55
<RSC>
66

7-
`cacheSignal` is currently only used with [React Server Components](/blog/2023/03/22/react-labs-what-we-have-been-working-on-march-2023#react-server-components).
7+
`cacheSignal`은 현재 [React 서버 컴포넌트](/blog/2023/03/22/react-labs-what-we-have-been-working-on-march-2023#react-server-components)에서만 사용할 수 있습니다.
88

99
</RSC>
1010

1111
<Intro>
1212

13-
`cacheSignal` allows you to know when the `cache()` lifetime is over.
13+
`cacheSignal`을 사용하면 `cache()` 수명이 언제 끝나는지 알 수 있습니다.
1414

1515
```js
1616
const signal = cacheSignal();
@@ -22,11 +22,11 @@ const signal = cacheSignal();
2222

2323
---
2424

25-
## Reference {/*reference*/}
25+
## 레퍼런스 {/*reference*/}
2626

2727
### `cacheSignal` {/*cachesignal*/}
2828

29-
Call `cacheSignal` to get an `AbortSignal`.
29+
`cacheSignal`을 호출하면 `AbortSignal`을 얻을 수 있습니다.
3030

3131
```js {3,7}
3232
import {cacheSignal} from 'react';
@@ -35,32 +35,32 @@ async function Component() {
3535
}
3636
```
3737

38-
When React has finished rendering, the `AbortSignal` will be aborted. This allows you to cancel any in-flight work that is no longer needed.
39-
Rendering is considered finished when:
40-
- React has successfully completed rendering
41-
- the render was aborted
42-
- the render has failed
38+
React가 렌더링을 완료하면 `AbortSignal`이 중단됩니다. 이를 통해 더 이상 필요하지 않은 진행 중인 작업을 취소할 수 있습니다.
39+
렌더링이 완료된 것으로 간주하는 경우는 다음과 같습니다.
40+
- React가 성공적으로 렌더링을 완료한 경우
41+
- 렌더링이 중단된 경우
42+
- 렌더링이 실패한 경우
4343

44-
#### Parameters {/*parameters*/}
44+
#### 매개변수 {/*parameters*/}
4545

46-
This function does not accept any parameters.
46+
이 함수는 매개변수를 받지 않습니다.
4747

48-
#### Returns {/*returns*/}
48+
#### 반환값 {/*returns*/}
4949

50-
`cacheSignal` returns an `AbortSignal` if called during rendering. Otherwise `cacheSignal()` returns `null`.
50+
`cacheSignal`은 렌더링 중에 호출되면 `AbortSignal`을 반환합니다. 그 외의 경우에 `cacheSignal()``null`을 반환합니다.
5151

52-
#### Caveats {/*caveats*/}
52+
#### 주의사항 {/*caveats*/}
5353

54-
- `cacheSignal` is currently for use in [React Server Components](/reference/rsc/server-components) only. In Client Components, it will always return `null`. In the future it will also be used for Client Component when a client cache refreshes or invalidates. You should not assume it'll always be null on the client.
55-
- If called outside of rendering, `cacheSignal` will return `null` to make it clear that the current scope isn't cached forever.
54+
- `cacheSignal`은 현재 [React 서버 컴포넌트](/reference/rsc/server-components)에서만 사용할 수 있습니다. 클라이언트 컴포넌트에서는 항상 `null`을 반환합니다. 향후 클라이언트 캐시가 갱신되거나 무효화될 때 클라이언트 컴포넌트에서도 사용될 예정입니다. 클라이언트에서 항상 `null`을 반환한다고 가정하면 안 됩니다.
55+
- 렌더링 외부에서 호출하면 `cacheSignal``null`을 반환하여 현재 스코프가 영원히 캐시되지 않음을 명확히 합니다.
5656

5757
---
5858

59-
## Usage {/*usage*/}
59+
## 사용법 {/*usage*/}
6060

61-
### Cancel in-flight requests {/*cancel-in-flight-requests*/}
61+
### 진행 중인 요청 취소하기 {/*cancel-in-flight-requests*/}
6262

63-
Call <CodeStep step={1}>`cacheSignal`</CodeStep> to abort in-flight requests.
63+
<CodeStep step={1}>`cacheSignal`</CodeStep>을 호출하여 진행 중인 요청을 중단할 수 있습니다.
6464

6565
```js [[1, 4, "cacheSignal()"]]
6666
import {cache, cacheSignal} from 'react';
@@ -71,7 +71,7 @@ async function Component() {
7171
```
7272

7373
<Pitfall>
74-
You can't use `cacheSignal` to abort async work that was started outside of rendering e.g.
74+
아래의 예시처럼 렌더링 외부에서 시작된 비동기 작업을 `cacheSignal`로 중단할 수 없습니다.
7575

7676
```js
7777
import {cacheSignal} from 'react';
@@ -83,9 +83,9 @@ async function Component() {
8383
```
8484
</Pitfall>
8585

86-
### Ignore errors after React has finished rendering {/*ignore-errors-after-react-has-finished-rendering*/}
86+
### React가 렌더링을 완료한 후 오류 무시하기 {/*ignore-errors-after-react-has-finished-rendering*/}
8787

88-
If a function throws, it may be due to cancellation (e.g. <CodeStep step={1}>the Database connection</CodeStep> has been closed). You can use the <CodeStep step={2}>`aborted` property</CodeStep> to check if the error was due to cancellation or a real error. You may want to <CodeStep step={3}>ignore errors</CodeStep> that were due to cancellation.
88+
함수가 오류를 던지는 경우 취소로 인한 것일 수 있습니다. (예를 들어, <CodeStep step={1}>데이터베이스 연결</CodeStep>이 닫힌 경우) <CodeStep step={2}>`aborted` 속성</CodeStep>을 사용하여 오류가 취소로 인한 것인지 실제 오류인지 확인할 수 있습니다. 취소로 인한 <CodeStep step={3}>오류는 무시할 수 있습니다</CodeStep>.
8989

9090
```js [[1, 2, "./database"], [2, 8, "cacheSignal()?.aborted"], [3, 12, "return null"]]
9191
import {cacheSignal} from "react";

0 commit comments

Comments
 (0)