상태 콜로케이션은 기본 설정이 아니라 아키텍처입니다.

작성자

카테고리:

← 피드로
DEV Community · Yasin Demir · 2026-07-07 개발(SW)
Cover image for State colocation is not a preference, it is an architecture

Yasin Demir

The first question I ask when reviewing a frontend architecture is: where does the state live relative to where it is used?

In most codebases I have reviewed, the answer is “in a global store, regardless of scope.” This is the wrong default.

The rule

State should live as close to its consumers as possible. If only one component needs it, it is component state. If a subtree needs it, it is a context or service scoped to that subtree. Global state is for truly global concerns: authentication, locale, theme.

Originally published on ysndmr.com.

Top comments (0)

Subscribe

Code of ConductReport abuse

For further actions, you may consider blocking this person and/or reporting abuse

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다