useSyncExternalStore

external fun <Snapshot> useSyncExternalStore(subscribe: (onStoreChange: () -> Unit) -> Cleanup, getSnapshot: () -> Snapshot, getServerSnapshot: () -> Snapshot = definedExternally): Snapshot(source)

Available since 18.0

See also