Zustand store를 구독하는 컴포넌트에서 무한 리렌더가 납니다.
const { user, posts } = useStore((s) => ({ user: s.user, posts: s.posts }))
Warning: Maximum update depth exceeded.
이렇게 객체로 여러 값을 꺼내는데 뭐가 문제일까요?
Zustand store를 구독하는 컴포넌트에서 무한 리렌더가 납니다.
const { user, posts } = useStore((s) => ({ user: s.user, posts: s.posts }))
Warning: Maximum update depth exceeded.
이렇게 객체로 여러 값을 꺼내는데 뭐가 문제일까요?
댓글 0