fix(stores): change store state interface #328
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of PR (check all applicable)
Summary
store state 작성법을 변경합니다
Description
store interface를 정의하기엔 공통의 기능이 없고, 큰 이득이 없어서 상태 관리 방법만 개선합니다.
store class에서 ref를 이용해서 상태를 관리해야 반응성을 유리하게 가져갈 수 있는 지점이 있어서 ref를 썼는데 외부에 노출하면 오염의 여지가 있어서 내부 변수로 하나를 가지고 있고, readonly로 감싼 녀석을 외부에 노출하도록 변경했습니다.