All Questions
492
questions
0
votes
0
answers
26
views
Can useReducer be used for state management instead of useState?
I have a set of product details stored in in Firestore. I've created a custom hook to fetch the product details. The product categories should be displayed in the matching url param. As I add more ...
-1
votes
1
answer
36
views
React/NextJS useEffect Timer Incrementing Coins Every Nanosecond Instead of Every Second
I am developing a mining application using React where a timer should increment the user's coins every second. However, the timer is adding coins at an incredibly fast rate (every nanosecond) instead ...
1
vote
2
answers
33
views
Fetching data from firebase and forwarding it to another component forwards an empty array
I am using an array and useState() to fetch the data from the firebase database. The array is initially empty. However after I recieve the data from the firebase after its initial loading and try to ...
2
votes
2
answers
39
views
Error React Js Firebase show createUser is not a function (using Context)
I am very new to React JS and Firebase. I tried to https://medium.com/ topic
"Building a Firebase Authentication and Private Route System in a React App"
After modifying the code and trial ...
0
votes
1
answer
47
views
react native auth provider effect not triggering for is authenticated check using firebase
I'm creating a register screen for my app, and to do that, I created a OnAuth hook, to register the login/register and logout functionality, and also manage the is authenticated state as wel as the ...
1
vote
1
answer
45
views
Needing to reload data on route change using same component - React TSX
Right now, I'm having trouble as my data that I am receiving from Firebase Firestore is able to load on both routes, however, it only does so if I click twice on the route link otherwise the old data ...
0
votes
0
answers
20
views
React states are being properly updated on an action [duplicate]
const [image_URL, setImageURL] = useState(null) // To store the URL of image
const [edu_list, setEduList] = useState([]) // To store array of educational qualification
const [skill_list, setSkillList]...
0
votes
4
answers
71
views
useEffect running infinitely and my daily limit on firebase reached within 2hours
i have made a CRUD app using firebase and react mostly on my own,
`
const userEmail = localStorage.getItem("email");
const [modalOpen, setModalOpen] = useState(false);
const [rows, ...
1
vote
2
answers
52
views
Update document in Firebase using ReactJS
I am developing a User Profile page, where users update their profile info. The first time when a user fills the form it is successfully saved in the firestore database. But the next time when the ...
0
votes
0
answers
22
views
copy collection to another collection cloud firestore [duplicate]
I want to copy all users collection to subcollection "follow" please see attached screenshot
got the collection in data array
useEffect(() => {
const getData = async () => {
...
0
votes
0
answers
58
views
Members array not populating the chat ID
I am creating a website that enables users to chat using their native language. It uses firebase extension to translate the chats in real time.
I have integrated everything, we have created a members ...
0
votes
0
answers
42
views
React useState and Context Issue: Unsubscribe Functions Remain undefined
Context:
I'm working on a Next.js application with Firebase and facing an issue with state propagation through a React context. I'm trying to update my context's state with unsubscribe functions for ...
0
votes
1
answer
112
views
[code=permission-denied]: Permission denied on resource project
firebase error:
I am using react-hooks-firebase, with react and TypeScript, I added true to the firebase database...
firebase.ts:
I added '' as a solution I saw in Stack Overflow with using the way ...
1
vote
0
answers
43
views
Firestore's getDocs() function does not get fulfilled or rejected for me when I try to use it to fetch a list of data
I am trying to fetch a collection (called books) of documents from my firestore with getDocs() function.
However, it does not seem to return any results (a Promise that does not get fulfilled or ...
0
votes
0
answers
51
views
How can I ensure my data is properly loaded before rendering?
I have a react app linked to my Firestore database and with firebase authentication integration. The problem is as such: upon first render, the loading screen works as intended. The console logs that ...