DEV Community

Discussion on: Ionic Framework App using React Firebase Hooks - File Upload Hook

Collapse
aaronksaunders profile image
Aaron K Saunders Author • Edited

In the upload hook, I have edited to the post to reflect the source code... thanks for the catch

var firebaseConfig = {
// ADD YOUR FIREBASE CONFIGURATION
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);

interface UploadDataResponse { metaData: firebase.storage.FullMetadata, downloadUrl: any };
interface ProgressResponse { value: number }

// the firebase reference to storage
const storageRef = firebase.storage().ref();
Collapse
seanmclem profile image
Seanmclem

There's no useRef, just let ref = storageRef
That's the only mention of storageRef in the article. Where does it get its value?

Thread Thread
aaronksaunders profile image
Aaron K Saunders Author

i added more details, thanks

Thread Thread
seanmclem profile image
Seanmclem

Thanks, I have a project where I'm going to use Firebase file upload in react shortly. I'll be gladly using your hook. Nice work!