Firebase (Realtime Database) | can't see nothing

SDK Version: 48.0.7
Platforms(Android/iOS/web/all): Android/web

Hi everyone,
i’m trying to implement my firebase realtime database in my expo project but i don’t see any video output when the request is made to the DB.
Here is my code:

import { Text, View } from “react-native”;
import firebase from ‘…/firebaseConfig’;
import { useEffect, useState } from “react”;
import { getDatabase, ref, child, get } from “firebase/database”;

export default function App() {
useEffect(() => {
const database = ref(getDatabase(firebase));
get(child(database, Codes/)).then((snapshot) => {
if (snapshot.exists()) {
console.log(snapshot.val());
} else {
console.log(“No data available”);
}
}).catch((error) => {
console.error(error);
});
return () => databaseRef.off();
}, );
return (

Test 123

);
}

as per the manual I followed the expo guide:

and from google:
https://firebase.google.com/docs/database/web/read-and-write?hl=it#web-modular-api
but i’m stuck at this point.
Can anyone tell me something?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.