mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: search page
This commit is contained in:
1 parent
408b561b75
commit
ffa1395b50
70 files changed
+492
-468
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import { useStore, type StoreKeys } from '@nanostores/react';
|
||||
import type { Store } from 'nanostores';
|
||||
|
||||
export function useStoreKey<Type, Key extends StoreKeys<Store<Type>>>(
|
||||
store: Store<Type>,
|
||||
key: Key,
|
||||
) {
|
||||
const state = useStore(store, { keys: [key] });
|
||||
return state[key];
|
||||
}
|
||||
Reference in new issue
Block a user