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

Provider Pattern | useThemeContext을 만드는 이유가 궁금해요 #5

Open
Choozii opened this issue Aug 13, 2023 · 1 comment
Open
Labels

Comments

@Choozii
Copy link
Contributor

Choozii commented Aug 13, 2023

각 컴포넌트에서 useContext 를 직접 import하는 대신 필요로 하는 컨텍스트를 직접 반환하는 훅을 구현할 수 있다.

혹시 각 컴포넌트에서 useContext를 사용하는게 단점이 있을까요?

@Choozii Choozii added the 질문 label Aug 13, 2023
@Choozii
Copy link
Contributor Author

Choozii commented Aug 13, 2023

그냥 여러곳에서 사용되는 로직이기 때문에 수정사항이 생겼을 때 한꺼번에 반영하기 좋도록 wrapping해주는 느낌으로 만드는 hook일까요?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant