I want to get data from firebase and map it and render a table with it but the firebase function returns data after the page loads. now if I make a var here let’s say var text= datas and console.log it it will return undefined the feed var is just some dummy text is there any way to make the
Tag: firebase-realtime-database
Realtime database cloud function sends result back before finishing
I’m trying to perform some realtime database tasks, which after completion, should send back a result back to the client so the client knows when the tasks have finished. I’ve tried to create a promise due to the fact some realtime database tasks do not return a promise – wasn’t sure which one. Based on the logs, the function completed
JS Firebase Database Error db.ref is not a function
Hi I am trying to implement firebase realtime database API in my website, I am following this documentation: https://firebase.google.com/docs/database/admin/save-data#node.js but I get this error: this is my code: What am I doing wrong? Could the version I am using be incorrect? Answer You’re mixing the new modular/v9 syntax of the API with the older namespaced syntax, and that won’t work.
react website not loading with firebase. What am I doing wrong?
I looked at the suggestions online for how to fix firebase, but they didn’t work. I tried setting my firebase.json hosting feature where says “public” to “build”, but that didn’t work so what else should I do? I don’t get errors when I compile it, but the website is blank when I run “npm start”. Here is the relevant javascript
How do I get database data using firebase/nuxtjs
I don’t know how to get the data via I’ve read the firebase docs but in firebase/nuxtJs different it becomes easier https://firebase.nuxtjs.org/ In firebase docs But when I call onValue, it doesn’t find it nuxt.config.js file Answer Simply simple explanation : in Realtime Database : Whenever the value is changed, the function will run
Data not loading
I’m using Firebase Realtime database to load some data, but I am loading the data to an innerHTML of a <span> element inside an owl carousel(“https://unpkg.com/swiper/swiper-bundle.min.js”) the data only loads when I click the left arrow of the carousel.I tested the problem with a <p>element and it loads instantly my loading code is: and my owl carousel code is: Answer
Get points of user that is currently logged in from realtime database
I want to get the points and show to the owner of that account when he is logged in I tried reading firebase documentation but I couldn’t made it here is the code that I use for assigning the random key and saving the child data I want whenever the user is login get his points from database and show
How to write data in Firebase Realtime Database as [custom key : value] in React?
What I’m trying to achieve is having random IDs in a dedicated node in Firebase Realtime Database, while being able to check if an ID already exists in the node before writing it to prevent duplicity. I’m working with web React (JavaScript). The database currently looks like this: What I’m aiming for is to have another node with IDs in
Using Axios instead of fetch for http get requests with Vue App
The following vue app should get some data from a firebase instance using the fetch method and display the data on the page. UserExperiences.vue SurveyResult.vue The data renders on the webpage correctly on the webpage using the fetch method. Is there a way to use axios.get instead? I’ve tried using the mounted vue property and it gets the data to
Firebase database. How to append values to array?
I have the following test data My question is how do I correctly append new value to an array without overwriting it? My idea was to retrieve existing data then spread it like so […currentData, “bob”]. Is there a better alternative? Answer There is no atomic operation to add an item to an array directly in the database. This means