Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/content/reference/react/useTransition.md
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ b { display: inline-block; margin-right: 10px; }

<Note>

When exposing an `action` prop from a component, you should `await` it inside the transition.
컴포넌트가 `action` prop을 전달받을 때는 Transition 내부에서 이를 `await` 해야 합니다.

이렇게 하면 `action` 콜백이 동기적이든 비동기적이든 상관없이 작동할 수 있으며, `action` 내부의 `await`을 추가적인 `startTransition`으로 감쌀 필요가 없습니다.

Expand Down Expand Up @@ -1955,7 +1955,7 @@ export async function updateQuantity(newName) {

이것은 예상된 동작입니다. Transition 내에서의 액션은 실행 순서를 보장하지 않기 때문입니다. 일반적인 사용 사례에서는 React가 [`useActionState`](/reference/react/useActionState)나 [`<form>` actions](/reference/react-dom/components/form)과 같은 더 높은 수준의 추상화를 제공하여 순서를 처리해 줍니다. 고급 사용 사례에서는 이 문제를 처리하기 위해 자체적인 큐잉(queuing) 및 취소 로직을 구현해야 합니다.

Example of `useActionState` handling execution order:
`useActionState`로 실행 순서를 처리하는 예시입니다.

<Sandpack>

Expand Down
Loading