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

[4주차 ✍️생각과제] #19

Merged
merged 12 commits into from
May 28, 2023
Merged

[4주차 ✍️생각과제] #19

merged 12 commits into from
May 28, 2023

Conversation

Chanwoo-Jeong
Copy link
Member

- React에서 Props Drilling을 해결하는 전략들은 무엇이 있을까?

상태를 내려주는 행위를 Props Drilling 이라고 하는데 component의 depth와 width 가 깊어지거나 넓어질 수록 관리가 어려워지고 복잡해진다.
기본적으로 너무 복잡해지거나 깊은 prop drilling을 막기위해 depth를 3개까지만 설계하는 것도 좋은 방식이라고 생각한다.
더불어 depth 가 너무 깊어지는 것도 좋지 않은 설계일 수 있기 때문이다.

그러나 프로젝트의 크기가 커지고 디테일 해질 수록 프롭드릴링만으로는 한계가 발생한다.
이때 전역상태관리를 고려해봐야 한다.
전역상태관리를 통해 다른 컴포넌트에서도 공유상태에 접근할 수 있도록 설계한다.
가장 많이 이용하는 툴들 중 대표적으로 ContextAPI , Recoil , Redux 가 있다.

https://chanu38.tistory.com/52

- 그렇다면 나는 합동세미나, 솝커톤, 웹잼에서 어떤걸 시도해보고 싶은가?

👉 Recoil 혹은 Redux toolkit 을 이용해보고 싶다.

Context 의 경우 모든 변수를 하나의 value 로 관리하면서 단점이 생긴다.
따라서 가장 많이 사용되는 Recoil 혹은 Redux toolkit 을 사용하고 싶다.

원하는 방향은 Redux toolkit 이다. 대부분의 기업에서 Redux 를 사용하기도 해서 미리 경험해보고 적용해보면 좋을 듯 싶다.
다만 팀원들의 상황과 능력을 고려하여 조금 더 쉬운 Recoil 쪽으로 접근해보는 것도 좋은 방법이라고 생각한다.

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

Successfully merging this pull request may close these issues.

1 participant