We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1f200a commit 9827edfCopy full SHA for 9827edf
cmdk/src/index.tsx
@@ -1015,7 +1015,7 @@ function mergeRefs<T = any>(refs: Array<React.MutableRefObject<T> | React.Legacy
1015
}
1016
1017
/** Run a selector against the store state. */
1018
-function useCmdk<T = any>(selector: (state: State) => T) {
+function useCmdk<T = any>(selector: (state: State) => T): T {
1019
const store = useStore()
1020
const cb = () => selector(store.snapshot())
1021
return useSyncExternalStore(store.subscribe, cb, cb)
0 commit comments