I am using react js firebase's realtime database and storage. I want to store an image and text contents to storage and realtime database respectively.
import {getDatabase, ref, set} from "firebase/database";
import {getStorage, ref} from "firebase/storage";
There was an error. I cannot import two 'ref' methods in same page.
Identifier 'ref' has already been declared. (32:22)
CodePudding user response:
import {getDatabase, ref as ref_database, set} from "firebase/database";
import {getStorage, ref as ref_storage} from "firebase/storage";