Skip to content

Commit 2b03281

Browse files
hg-pyunclaude
andcommitted
fix: CI 빌드 및 lint 에러 수정
- ViewTransition.md: 중복된 <Intro> 태그 제거 - useActionState.md: 고아 <Recipes> 태그 제거, 누락된 DeepDive 섹션 추가 - useEffectEvent.md: 닫히지 않은 Sandpack 태그 수정 및 잔여 텍스트 제거 - form.md: 앵커 ID를 upstream과 일치하도록 수정 (server-action → server-function) - .prettierignore: worker-bundle.dist.js 제외 추가 - editorconfig 에러 수정 (줄 끝, 들여쓰기) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7b754a8 commit 2b03281

File tree

9 files changed

+24
-17
lines changed

9 files changed

+24
-17
lines changed

.claude/skills/docs-rsc-sandpack/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,4 +274,4 @@ The strings are necessary to provide to Sandpack as local files (skips Sandpack
274274
```bash
275275
node scripts/buildRscWorker.mjs # Rebuild worker bundle after source changes
276276
yarn dev # Start dev server to test examples
277-
```
277+
```

.claude/skills/docs-writer-reference/SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -764,11 +764,11 @@ When documenting Server Function arguments, list supported types:
764764
Supported types for Server Function arguments:
765765

766766
* Primitives
767-
* [string](MDN-link)
768-
* [number](MDN-link)
767+
* [string](MDN-link)
768+
* [number](MDN-link)
769769
* Iterables containing serializable values
770-
* [Array](MDN-link)
771-
* [Map](MDN-link)
770+
* [Array](MDN-link)
771+
* [Map](MDN-link)
772772

773773
Notably, these are not supported:
774774
* React elements, or [JSX](/learn/writing-markup-with-jsx)

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ scripts
22
plugins
33
next.config.js
44
.claude/
5-
worker-bundle.dist.js
5+
worker-bundle.dist.js

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
src/content/**/*.md
2+
src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/worker-bundle.dist.js

src/content/learn/rsc-sandbox-test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,4 +572,4 @@ export default function LikeButton({ addLike }) {
572572
}
573573
```
574574

575-
</SandpackRSC>
575+
</SandpackRSC>

src/content/reference/react-dom/components/form.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default function Search() {
7171

7272
</Sandpack>
7373

74-
### 서버 함수에서 폼 제출 처리하기 {/*handle-form-submission-with-a-server-action*/}
74+
### 서버 함수에서 폼 제출 처리하기 {/*handle-form-submission-with-a-server-function*/}
7575

7676
입력 및 제출 버튼과 함께 `<form>`을 렌더링하세요. 폼을 제출할 때 해당 함수를 실행하기 위해 서버 함수([`'use server'`](/reference/rsc/use-server)가 표시된 함수)를 폼의 `action` 프로퍼티로 전달하세요.
7777

src/content/reference/react/ViewTransition.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ title: <ViewTransition>
33
version: canary
44
---
55

6-
7-
8-
<Intro>
9-
106
<Canary>
117

128
**`<ViewTransition />` API는 현재 React의 카나리 및 실험적 채널에서만 사용할 수 있습니다.**

src/content/reference/react/useActionState.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ function action(currentState, formData) {
107107
}
108108
```
109109
110-
<Recipes titleText="폼 제출 후 정보 표시하기" titleId="display-information-after-submitting-a-form">
111-
112110
#### 오류 표시하기 {/*display-form-errors*/}
113111
114112
서버 함수<sup>Server Function</sup>에서 반환된 오류 메시지나 토스트 메시지를 표시하려면, 해당 액션을 `useActionState`로 감싸주세요.
@@ -241,6 +239,20 @@ button {
241239
242240
Every time you click "Add Ticket," React queues a call to `addToCartAction`. React shows the pending state until all the tickets are added, and then re-renders with the final state.
243241
242+
<DeepDive>
243+
244+
#### How `useActionState` queuing works {/*how-useactionstate-queuing-works*/}
245+
246+
Try clicking "Add Ticket" multiple times. Every time you click, a new `addToCartAction` is queued. Since there's an artificial 1 second delay, that means 4 clicks will take ~4 seconds to complete.
247+
248+
**This is intentional in the design of `useActionState`.**
249+
250+
We have to wait for the previous result of `addToCartAction` in order to pass the `prevCount` to the next call to `addToCartAction`. That means React has to wait for the previous Action to finish before calling the next Action.
251+
252+
You can typically solve this by [using with useOptimistic](/reference/react/useActionState#using-with-useoptimistic) but for more complex cases you may want to consider [cancelling queued actions](#cancelling-queued-actions) or not using `useActionState`.
253+
254+
</DeepDive>
255+
244256
#### 폼 제출 후 구조화된 정보 표시하기 {/*display-structured-information-after-submitting-a-form*/}
245257
246258
서버 함수<sup>Server Function</sup>의 반환값은 직렬화 가능한 어떤 값이든 가능합니다. 예를 들어, 액션 성공 여부를 나타내는 불리언, 오류 메시지, 업데이트된 객체 등 다양하게 활용할 수 있습니다.

src/content/reference/react/useEffectEvent.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,7 @@ export default function Timer() {
177177
}
178178
```
179179

180-
이 예시에서, `url`이 바뀔 때(새로운 페이지 방문을 로깅하기 위해) Effect는 랜더 이후에 다시 동작해야 합니다. 그러나 이것은 `numberOfItems`가 바뀔 때 다시 동작하면 **안됩니다**. 로깅 로직을 Effect 이벤트로 감싸 `numberOfItems`는 비반응형이 됩니다. 이것은 항상 Effect를 트리거 하는 것 없이 최신의 값을 읽습니다.
181-
182-
`url`과 같은 반응형 값을 Effect 이벤트의 인수로 전달할 수 있습니다. 이로써, 이벤트 내부의 비반응형 값에 접근할 때 이것들을 반응형으로 유지할 수 있습니다.
180+
</Sandpack>
183181

184182
Try changing the increment value while the timer is running. The counter immediately uses the new increment value, but the timer keeps ticking smoothly without restarting.
185183

0 commit comments

Comments
 (0)