02-app > 02-api-reference > 04-functions > cookies.mdx#381
Open
anonymousRecords wants to merge 1 commit intoNextjs-kr:mainfrom
Open
02-app > 02-api-reference > 04-functions > cookies.mdx#381anonymousRecords wants to merge 1 commit intoNextjs-kr:mainfrom
anonymousRecords wants to merge 1 commit intoNextjs-kr:mainfrom
Conversation
Contributor
|
ref #45 |
chaejunlee
reviewed
Jul 24, 2023
Contributor
chaejunlee
left a comment
There was a problem hiding this comment.
기여해주셔서 감사합니다! 수정 사항 몇 가지 커멘트 드렸으니 확인 후 반영 부탁드립니다!
| related: | ||
| title: Next Steps | ||
| description: For more information on what to do next, we recommend the following sections | ||
| links: |
| --- | ||
|
|
||
| The `cookies` function allows you to read the HTTP incoming request cookies from a [Server Component](/docs/getting-started/react-essentials) or write outgoing request cookies in a [Server Action](/docs/app/building-your-application/data-fetching/server-actions) or [Route Handler](/docs/app/building-your-application/routing/router-handlers). | ||
| `cookies` 기능을 사용하면 [서버 구성요소](/docs/getting-started/react-essentials)에서 HTTP 수신 요청 쿠키를 읽거나 [서버 액션](/docs/app/building-your-application/data-fetching/server-actions) 또는 [라우트 핸들러](/docs/app/building-your-application/routing/router-handlers)에 송신 요청 쿠키를 쓸 수 있습니다. |
Contributor
There was a problem hiding this comment.
Suggested change
| `cookies` 기능을 사용하면 [서버 구성요소](/docs/getting-started/react-essentials)에서 HTTP 수신 요청 쿠키를 읽거나 [서버 액션](/docs/app/building-your-application/data-fetching/server-actions) 또는 [라우트 핸들러](/docs/app/building-your-application/routing/router-handlers)에 송신 요청 쿠키를 쓸 수 있습니다. | |
| `cookies` 기능을 사용하면 [서버 컴포넌트](/docs/getting-started/react-essentials)에서 HTTP 수신 요청 쿠키를 읽거나 [서버 액션](/docs/app/building-your-application/data-fetching/server-actions) 또는 [라우트 핸들러](/docs/app/building-your-application/routing/router-handlers)에 송신 요청 쿠키를 쓸 수 있습니다. |
| `cookies` 기능을 사용하면 [서버 구성요소](/docs/getting-started/react-essentials)에서 HTTP 수신 요청 쿠키를 읽거나 [서버 액션](/docs/app/building-your-application/data-fetching/server-actions) 또는 [라우트 핸들러](/docs/app/building-your-application/routing/router-handlers)에 송신 요청 쿠키를 쓸 수 있습니다. | ||
|
|
||
| > **Good to know**: `cookies()` is a **[Dynamic Function](/docs/app/building-your-application/rendering/static-and-dynamic-rendering#dynamic-functions)** whose returned values cannot be known ahead of time. Using it in a layout or page will opt a route into **[dynamic rendering](/docs/app/building-your-application/rendering/static-and-dynamic-rendering#dynamic-rendering)** at request time. | ||
| > **참고** : `cookies()`는 반환된 값을 미리 알 수 없는 [동적 함수](/docs/app/building-your-application/rendering/static-and-dynamic-rendering#dynamic-functions)입니다. 레이아웃 또는 페이지에서 사용하면 요청 시 [동적 렌더링](/docs/app/building-your-application/rendering/static-and-dynamic-rendering#dynamic-rendering) 경로가 선택됩니다. |
Contributor
There was a problem hiding this comment.
Suggested change
| > **참고** : `cookies()`는 반환된 값을 미리 알 수 없는 [동적 함수](/docs/app/building-your-application/rendering/static-and-dynamic-rendering#dynamic-functions)입니다. 레이아웃 또는 페이지에서 사용하면 요청 시 [동적 렌더링](/docs/app/building-your-application/rendering/static-and-dynamic-rendering#dynamic-rendering) 경로가 선택됩니다. | |
| > **참고** : `cookies()`는 반환된 값을 미리 알 수 없는 **[동적 함수](/docs/app/building-your-application/rendering/static-and-dynamic-rendering#dynamic-functions)**입니다. 레이아웃 또는 페이지에서 사용하면 요청 시 경로는 **[동적 렌더링](/docs/app/building-your-application/rendering/static-and-dynamic-rendering#dynamic-rendering)**으로 선택됩니다. |
| ## `cookies().get(name)` | ||
|
|
||
| A method that takes a cookie name and returns an object with name and value. If a cookie with `name` isn't found, it returns `undefined`. If multiple cookies match, it will only return the first match. | ||
| 쿠키 이름을 사용하고 이름과 값을 가진 개체를 반환하는 메서드입니다. name이 지정된 쿠키를 찾을 수 없으면 undefined 쿠키가 반환됩니다. 여러 쿠키가 일치하는 경우 첫 번째 일치 항목만 반환됩니다. |
Contributor
There was a problem hiding this comment.
Suggested change
| 쿠키 이름을 사용하고 이름과 값을 가진 개체를 반환하는 메서드입니다. name이 지정된 쿠키를 찾을 수 없으면 undefined 쿠키가 반환됩니다. 여러 쿠키가 일치하는 경우 첫 번째 일치 항목만 반환됩니다. | |
| 쿠키 이름을 사용하고 이름과 값을 가진 객체를 반환하는 메서드입니다. 쿠키에서 `name`을 찾을 수 없으면 `undefined`가 반환됩니다. 일치하는 쿠키가 여러 개인 경우 가장 먼저 일치하는 쿠키만 반환됩니다. |
| ## `cookies().has(name)` | ||
|
|
||
| A method that takes a cookie name and returns a `boolean` based on if the cookie exists (`true`) or not (`false`). | ||
| 쿠키 이름을 사용하고 쿠키의 존재(`true`) 여부(`false`)를 기준으로 `boolean`을 반환하는 메서드입니다. |
Contributor
There was a problem hiding this comment.
Suggested change
| 쿠키 이름을 사용하고 쿠키의 존재(`true`) 여부(`false`)를 기준으로 `boolean`을 반환하는 메서드입니다. | |
| 쿠키 이름을 사용하고 쿠키의 존재하는지(`true`), 존재하지 않는지(`false`)를 기준으로 `boolean`을 반환하는 메서드입니다. |
| ## `cookies().set(name, value, options)` | ||
|
|
||
| A method that takes a cookie name, value, and options and sets the outgoing request cookie. | ||
| 쿠키 이름, 값 및 옵션을 사용하고 나가는 요청 쿠키를 설정하는 메서드입니다. |
Contributor
There was a problem hiding this comment.
Suggested change
| 쿠키 이름, 값 및 옵션을 사용하고 나가는 요청 쿠키를 설정하는 메서드입니다. | |
| 쿠키 이름, 값 및 옵션을 받아서 송신 요청 쿠키를 설정하는 메서드입니다. |
| 쿠키 이름, 값 및 옵션을 사용하고 나가는 요청 쿠키를 설정하는 메서드입니다. | ||
|
|
||
| > **Good to know**: `.set()` is only available in a [Server Action](/docs/app/building-your-application/data-fetching/server-actions) or [Route Handler](/docs/app/building-your-application/routing/router-handlers). | ||
| > **참고** : `.set()`은 [서버 액셕](/docs/app/building-your-application/data-fetching/server-actions) 또는 [라우트 핸들러](/docs/app/building-your-application/routing/router-handlers)에서만 사용할 수 있습니다. |
Contributor
There was a problem hiding this comment.
Suggested change
| > **참고** : `.set()`은 [서버 액셕](/docs/app/building-your-application/data-fetching/server-actions) 또는 [라우트 핸들러](/docs/app/building-your-application/routing/router-handlers)에서만 사용할 수 있습니다. | |
| > **참고** : `.set()`은 [서버 액션](/docs/app/building-your-application/data-fetching/server-actions) 또는 [라우트 핸들러](/docs/app/building-your-application/routing/router-handlers)에서만 사용할 수 있습니다. |
| 쿠키를 "삭제"하려면 이름이 같고 값이 비어 있는 새 쿠키를 설정해야 합니다. 쿠키를 즉시 만료하도록 `maxAge`를 `0`으로 설정할 수도 있습니다. | ||
|
|
||
| > **Good to know**: `.set()` is only available in a [Server Action](/docs/app/building-your-application/data-fetching/server-actions) or [Route Handler](/docs/app/building-your-application/routing/router-handlers). | ||
| > 참고 : `.set()`은 [서버 액션](/docs/app/building-your-application/data-fetching/server-actions) 또는 [라우트 핸들러](/docs/app/building-your-application/routing/router-handlers)에서만 사용할 수 있습니다. |
Contributor
There was a problem hiding this comment.
Suggested change
| > 참고 : `.set()`은 [서버 액션](/docs/app/building-your-application/data-fetching/server-actions) 또는 [라우트 핸들러](/docs/app/building-your-application/routing/router-handlers)에서만 사용할 수 있습니다. | |
| > **참고** : `.set()`은 [서버 액션](/docs/app/building-your-application/data-fetching/server-actions) 또는 [라우트 핸들러](/docs/app/building-your-application/routing/router-handlers)에서만 사용할 수 있습니다. |
| | 버전 | 변경 내용 | | ||
| | --------- | --------------------- | | ||
| | `v13.0.0` | `cookies` introduced. | | ||
| | `v13.0.0` | `cookies` 소개 | |
Contributor
There was a problem hiding this comment.
Suggested change
| | `v13.0.0` | `cookies` 소개 | | |
| | `v13.0.0` | `cookies` 도입 | |
Member
|
@anonymousRecords 리뷰 이후 작업이 몇일 동안 이뤄지지 않아 9월 13일까지 작업이 없을 경우 이슈를 close하고 새로운 분에게 할당하겠습니다! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
기여자용
문서 개선
pnpm prettier-fix를 실행하여 서식 문제를 해결합니다.Progress
pnpm prettier-fixcloses #45