Skip to content

Commit fde12c1

Browse files
lumirlumirCopilot
andauthored
Update src/content/learn/extracting-state-logic-into-a-reducer.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 038a810 commit fde12c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/learn/extracting-state-logic-into-a-reducer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,7 @@ ul, li { margin: 0; padding: 0; }
10961096

10971097
</Sandpack>
10981098

1099-
Reducer는 순수해야 하기 때문에, 이 안에서는 State를 변경할 수 없습니다. 그러나, Immer에서 제공하는 특별한 `draft` 객체를 사용하면 안전하게 State를 변경할 수 있습니다. 내부적으로, Immer는 변경 사항이 반영된 `draft`로 State의 복사본을 생성합니다. 이것이 `useImmerReducer`가 관리하는 reducer가 첫 번째 인수인 State를 변형할 수 있고 새로운 State 값을 반환할 필요가 없는 이유입니다.
1099+
Reducer는 순수해야 하기 때문에, 이 안에서는 State를 변경할 수 없습니다. 그러나, Immer에서 제공하는 특별한 `draft` 객체를 사용하면 안전하게 State를 변경할 수 있습니다. 내부적으로, Immer는 변경 사항이 반영된 `draft`로 State의 복사본을 생성합니다. 이것이 `useImmerReducer`가 관리하는 Reducer가 첫 번째 인수인 State를 변형할 수 있고 새로운 State 값을 반환할 필요가 없는 이유입니다.
11001100

11011101
## 요약 {/*요약*/}
11021102

0 commit comments

Comments
 (0)