Skip to content

[민혁] 5주차#10

Merged
junye0l merged 1 commit into
mainfrom
민혁/week-05
Jun 4, 2026

Hidden character warning

The head ref may contain hidden characters: "\ubbfc\ud601/week-05"
Merged

[민혁] 5주차#10
junye0l merged 1 commit into
mainfrom
민혁/week-05

Conversation

@jaqwe2301

Copy link
Copy Markdown
Contributor

공유하고싶은 내용

이번에 책을 읽으면서 subscribe과 상태 관리에 대한 내용이 흥미로웠습니다.

컴포넌트가 store를 구독한다.
↓
store의 상태가 변경된다.
↓
store가 구독 중인 컴포넌트에게 상태 변경을 알린다.
↓
컴포넌트가 새로운 상태를 읽고 다시 렌더링된다.

이 흐름을 보면서 저희 프로젝트 Yamoyo에서 토큰 만료온보딩 리다이렉트 처리를 위해 구현하였던 이벤트 버스(event-bus)가 떠올랐습니다.

Yamoyo에서의 이벤트 버스

이벤트 버스도 특정 이벤트가 발생했을 때 이를 구독 중인 대상에게 알려준다는 점에서 상태 관리 라이브러리의 subscribe 구조와 유사하다고 느꼈습니다.

또한, 이번 챕터를 읽으며 Zustand 같은 상태 관리 라이브러리도 단순히 전역 상태를 저장하는 도구가 아니라, 외부 store의 변경을 React 컴포넌트에 알려주는 subscribe 구조를 기반으로 동작한다는 점이 기억이 잘 남는 것 같습니다.

파일 체크

  • 브랜치명이 name/week-nn 규칙을 따름
  • 정리 파일 경로/이름이 규칙에 맞음 (week-nn/name.md 또는 week-nn/name/index.md)
  • 이미지/첨부 파일 경로가 주차 폴더 내에 정리됨

@junye0l junye0l changed the title docs(5주차): 리액트와 상태 관리 라이브러리 [민혁] 5주차 Jun 4, 2026
@junye0l junye0l merged commit be90757 into main Jun 4, 2026
1 check passed
@junye0l junye0l deleted the 민혁/week-05 branch June 4, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants