Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initialState에서 fetch 로직 분리하기 #24

Closed
Tracked by #21
youzysu opened this issue Jun 1, 2023 · 2 comments
Closed
Tracked by #21

initialState에서 fetch 로직 분리하기 #24

youzysu opened this issue Jun 1, 2023 · 2 comments

Comments

@youzysu
Copy link
Owner

youzysu commented Jun 1, 2023

  • 리덕스는 비동기 작업 처리를 어떻게 하지?
  • 함수를 dispatch 한다. 함수를 전달한다.
@youzysu
Copy link
Owner Author

youzysu commented Jun 1, 2023

youzysu added a commit that referenced this issue Jun 3, 2023
- 컴포넌트 생성 시 빈값으로 Element를 모두 생성한다.
- componentDidMount: DOM 생성 이후 초기화에 필요한 로직을 진행한다.
- thunkDispatch: 데이터 fetch 작업을 나중에 하도록 함수로 감싸서 Action을 실행한다.
- 언론사 구독 리스트를 로컬 스토리지와 연동(동기화)한다.
@youzysu youzysu closed this as completed Jun 3, 2023
@youzysu
Copy link
Owner Author

youzysu commented Jun 5, 2023

  1. 위의 방식처럼 View에서 진행하지 않고,
  2. Model(Store)에서 data fetch method로 분리해서 (언제 실행? - main에서 view 빈값으로 만들고 나서)

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

No branches or pull requests

1 participant