QuizNot attempted
useSyncExternalStore third argument
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
- It provides a fallback value to use during server-side rendering / hydration (
getServerSnapshot)
- The optional third argument is
getServerSnapshot: it supplies the value during server rendering and hydration, wherewindowdoesn't exist, and must match on server and client. - Not a debounce delay: the store decides when to notify.
- Not an equality comparator: React compares snapshots with
Object.is(selectors live in theuseSyncExternalStoreWithSelectorshim). - Not 'only two arguments': the third exists for SSR.