MCPcopy Index your code
hub / github.com/FirebaseExtended/reactfire / FetchImage

Function FetchImage

example/withoutSuspense/Storage.tsx:54–63  ·  view source on GitHub ↗
({ storagePath })

Source from the content-addressed store, hash-verified

52};
53
54const FetchImage = ({ storagePath }) => {
55 const storage = useStorage();
56
57 const { status, data: imageURL } = useStorageDownloadURL(ref(storage, storagePath));
58 if (status === 'loading') {
59 return <LoadingSpinner />;
60 }
61
62 return <img src={imageURL} alt="demo download" style={{ width: '200px', height: '200px' }} />;
63};
64
65export function Storage() {
66 const app = useFirebaseApp();

Callers

nothing calls this directly

Calls 2

useStorageFunction · 0.85
useStorageDownloadURLFunction · 0.85

Tested by

no test coverage detected