useSyncExternalStore

기본 문법

const state = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot)

작동 방식

어떻게 리렌더링 되는걸까?