useSyncExternalStore<T> function

T useSyncExternalStore<T>(
  1. StoreSubscribe subscribe,
  2. Snapshot<T> getSnapshot, [
  3. Snapshot<T>? getServerSnapshot
])

Subscribes to an external store with an SSR snapshot when provided.

See https://react.dev/reference/react/useSyncExternalStore.

Implementation

T useSyncExternalStore<T>(
  StoreSubscribe subscribe,
  Snapshot<T> getSnapshot, [
  Snapshot<T>? getServerSnapshot,
]) => currentReactRuntime.binding.useSyncExternalStore(
  subscribe,
  getSnapshot,
  getServerSnapshot,
);