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
Tag: firebase-realtime-database
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
How to call push() function from firebase database
I’m trying to get a unique key from the push function but whenever I call it I get this error: Uncaught TypeError: postsRef.push is not a function at HTMLFormElement. These are my imports: And these are the lines that I use to call the push function: I hope you guys can help me, thank you Answer push is nowadays a
Getting the Data in snapshot.val() but not able to treat it
I was making an app and had to fetch data from Realtime Database. I am getting the data in snapshot.val() like this And Now I want to access this data. When I am trying snapshot.val()[0].email and snapshot.val().[0].email I am Getting So, I am working in React Native and this is the code The nodes of database are as follows: Please
I can’t figure out how to work with the object returned by Firebase get query
I’m building a React Native app with Expo and integrating Firebase (real time database) which I know has some limitations (https://docs.expo.dev/guides/using-firebase/). I’m trying to get a snapshot of the data using await get(query(… and have successfully done so, but I can’t figure out exactly what I’m working with. When I console.log it I get this: I was trying to return
How can I instantly load all my firebase entries without re-rendering?
Circumstances: For my app project that uses a realtime database I’m trying to load in data from all machines that are associated with the user. The machines that the user should see are dependent on the related company (cid) and which machines belong to that company. Problem: I have used the Firebase v9 docs as much as possible and have