Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardReactuseSyncExternalStoreSingle-choice MCQ

Consider a custom external store read with the hook below. The store's value is a new object literal each call. What happens at runtime and why?

const snapshot = useSyncExternalStore( store.subscribe, () => ({ count: store.count }) // new object each call );