Nostr stream provider init
This commit is contained in:
6
src/hooks/stream-provider.tsx
Normal file
6
src/hooks/stream-provider.tsx
Normal file
@ -0,0 +1,6 @@
|
||||
import { StreamProviderStore } from "providers";
|
||||
import { useSyncExternalStore } from "react";
|
||||
|
||||
export function useStreamProvider() {
|
||||
return useSyncExternalStore(c => StreamProviderStore.hook(c), () => StreamProviderStore.snapshot());
|
||||
}
|
Reference in New Issue
Block a user