Can dates can be considered monotonically in Firestore?

Advertisements I read here that: Do not use monotonically increasing document IDs such as: Customer1, Customer2, Customer3, … Product 1, Product 2, Product 3, … I plan to use document IDs such: 2023-09-01, 2023-09-02, 2023-09-07, … The dates are not always consecutive. It can be or cannot be. Can be these dates be considered monotonically?… Read More Can dates can be considered monotonically in Firestore?

Saving Day to Firestore for the first time only in flutter

Advertisements After registering as a member of firebase, you are also trying to add data to the firestore The code is as follows await FirebaseFirestore.instance.collection(‘users’).doc(FirebaseAuth.instance.currentUser!.uid).set({ ‘1_email’ : FirebaseAuth.instance.currentUser!.email, ‘2_name’ : ‘Null’, ‘3_phone’ : ‘01012345678’, ‘4_age’ : 20, } ); I want the data to be stored in the firestore only for the first time So… Read More Saving Day to Firestore for the first time only in flutter

Retrieving multiple documents as custom object in Firestore

Advertisements Currently, I have a React application connected to Firestore. I followed the official documentation on adding custom objects to Firestore via the help of withConverter function. Now I want to read all the data I uploaded to Firestore into my app as a custom object again. But the documentation on Firestore did not show… Read More Retrieving multiple documents as custom object in Firestore

How to fetch id from console log firestore and react js

Advertisements fam, I have a document added to cloud firestore, I can successfully read data from the database, I want to get only the ID from the document, here’s the code snippet:- const [tasks, setTasks] = useState([]); const [fetch, setFetch] = useState({ id: “”, }); const {userId} = useParams(); const collectionRef = collection(db, “microsystems/” +… Read More How to fetch id from console log firestore and react js

Firestore query to retrieve users based on last connection and presence of field

Advertisements I have a Firestore collection called users that contains user documents. Each user document has an optional field called previewPosts, which is an array representing the user’s four most recent posts. Additionally, there is another field called lastConnection that stores the timestamp of the user’s last online connection. I want to implement a query… Read More Firestore query to retrieve users based on last connection and presence of field

How can I access the props from this taskList array?

Advertisements I’m trying to access the props from this taskList array that I’m grabbing from firestore, The taskList is an array of objects so shouldn’t I just be able to access them with task.propName? function App() { const [taskList, setTaskList] = useState<Array<object>>() const taskCollectionRef = collection(db, "tasks") useEffect(() => { const getTaskList = async ()… Read More How can I access the props from this taskList array?