Replies: 7 comments 8 replies
-
1. ContextContext API는 Selector가 없어서, 최상단 state를 업데이트하면 하위의 모든 컴포넌트가 리렌더링된다는 치명적인 성능이슈 존재 |
Beta Was this translation helpful? Give feedback.
-
2. Redux
특징
|
Beta Was this translation helpful? Give feedback.
-
3. Recoil장점
특징
|
Beta Was this translation helpful? Give feedback.
-
4. Zustand장점
특징
|
Beta Was this translation helpful? Give feedback.
-
|
지금까지 Zustand를 제외한 Redux, Recoil, Context API 모두 사용해보았다. Redux는 보일러 플레이트 코드도 많고, 제일 안니옫가 있었다. Recoil은 useState처럼 사용하기 간편하다는 장점이 있지만, 지금 이 프로젝트를 장기적으로 보았을 때 상태를 관리하고 예측하기가 어려워질 것이라 생각한다. Context API는 하위의 모든 컴포넌트가 리렌더링된다는 치명적인 단점으로 인해 선택하기 힘들 것 같다. Zustand를 사용해보지 않았기도 했고, 프론트엔드 파트인 호균님이 권하기도 했다. 또한, 코드가 직관적이고 Redux와 동일한 Flux패턴이라고 한다. 한 번 이번에는 Zustand를 사용해볼까? |
Beta Was this translation helpful? Give feedback.
-
컴포넌트 중심
데이터 중심
|
Beta Was this translation helpful? Give feedback.
-
|
아무래도, Recoil은 프로젝트의 규모가 커진다는 것을 고려했을 때, 적합하지 않은 라이브러리이다. Redux를 사용하기에는 BoilerPlate Code가 너무 많다. Zustand는 사용하기도 간단하고, Redux와 같이 Flux패턴을 사용한다. 그리고, 처음 써본다. Zustand를 써봄으로써 새로운 노하우와 경험이 또 쌓일 것이다. |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
전역상태 관리 라이브러리 후보
Beta Was this translation helpful? Give feedback.
All reactions